Class StringList

All Implemented Interfaces:
Serializable, Cloneable, Iterable<String>, Collection<String>, List<String>, RandomAccess

public class StringList extends ArrayList<String>
Represents a list of strings with some additional methods.
See Also:
  • Constructor Details

    • StringList

      public StringList()
      Creates a new empty list of strings.
    • StringList

      public StringList(int initialCapacity)
      Creates a new empty list of strings with an initial capacity.
      Parameters:
      initialCapacity - the capacity
    • StringList

      public StringList(Collection<String> existing)
      Creates a new list with items copied from the existing collection.
      Parameters:
      existing - the existing collection
    • StringList

      public StringList(String item, String... items)
      Creates a new list with given items.
      Parameters:
      item - first item
      items - more items
  • Method Details

    • containsIgnoreCase

      public boolean containsIgnoreCase(String value)
      Returns whether the list contains the given value, ignoring differences in the cases of the letters.
      Parameters:
      value - the value to compare with
      Returns:
      the result
    • removeIgnoreCase

      public void removeIgnoreCase(String value)
      Removes all strings equal to the given value, ignoring differences in the cases of the letters.
      Parameters:
      value - the value to compare with
    • appendIfNotContained

      Appends the value to the list of values if it is not already in the list.
      Parameters:
      value - the value
      Returns:
      the field