Interface StringList

All Superinterfaces:
Iterable<String>, Iterable<String>

public interface StringList extends Iterable<String>
An interface defining a list of strings.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Add a String to the list.
    get(int index)
    Get the string at index index.
    int
     
    Return the contents of the list as an array.
    toStringArray(int from, int to)
    Return a section of the contents of the list.

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

    Methods inherited from interface org.bouncycastle.util.Iterable

    iterator
  • Method Details

    • add

      boolean add(String s)
      Add a String to the list.
      Parameters:
      s - the String to add.
      Returns:
      true
    • get

      String get(int index)
      Get the string at index index.
      Parameters:
      index - the index position of the String of interest.
      Returns:
      the String at position index.
    • size

      int size()
    • toStringArray

      String[] toStringArray()
      Return the contents of the list as an array.
      Returns:
      an array of String.
    • toStringArray

      String[] toStringArray(int from, int to)
      Return a section of the contents of the list. If the list is too short the array is filled with nulls.
      Parameters:
      from - the initial index of the range to be copied, inclusive
      to - the final index of the range to be copied, exclusive.
      Returns:
      an array of length to - from