org.gjt.sp.util

## Class StringList

- java.lang.Object
- - java.util.AbstractCollection<E>
  - - java.util.AbstractList<E>
    - - java.util.ArrayList<java.lang.String>
      - - org.gjt.sp.util.StringList

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<java.lang.String>, java.util.Collection<java.lang.String>, java.util.List<java.lang.String>, java.util.RandomAccess

      public class StringList
      extends java.util.ArrayList<java.lang.String>

  A List<String> with some perl-like convenience functions (split/join primarily), and easy conversion to/from arrays.
  Since:
    jEdit 4.3pre7
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class java.util.AbstractList

      `modCount`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StringList()`
    `StringList(java.lang.Object[] array)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAll(java.lang.Object[] array)`
    `static java.lang.String` | `join(java.util.Collection<java.lang.String> c, java.lang.String delim)` The reverse of split - given a collection, takes each element and places it in a string, joined by a delimiter.
    `static java.lang.String` | `join(java.lang.Object[] arr, java.lang.String delim)`
    `java.lang.String` | `join(java.lang.String delim)` Non-static version, that joins "this" StringList.
    `static void` | `main(java.lang.String[] args)`
    `static StringList` | `split(java.lang.String orig, java.lang.Object delim)`
    `java.lang.String[]` | `toArray()`
    `java.lang.String` | `toString()` Joins each string in the list with a newline.

    - ### Methods inherited from class java.util.ArrayList

      `add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, trimToSize`

    - ### Methods inherited from class java.util.AbstractList

      `equals, hashCode`

    - ### Methods inherited from class java.util.AbstractCollection

      `containsAll`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.List

      `containsAll, equals, hashCode`

    - ### Methods inherited from interface java.util.Collection

      `parallelStream, stream`

- - ### Constructor Detail

    - #### StringList

          public StringList()

    - #### StringList

          public StringList(java.lang.Object[] array)

  - ### Method Detail

    - #### addAll

          public void addAll(java.lang.Object[] array)

    - #### split

          public static StringList split(java.lang.String orig,
                                         java.lang.Object delim)

      Parameters:
        `orig` - the original string
        `delim` - a delimiter to use for splitting
      Returns:
        a new StringList containing the split strings.

    - #### toString

          public java.lang.String toString()

      Joins each string in the list with a newline.
      Overrides:
        `toString` in class `java.util.AbstractCollection<java.lang.String>`
      Returns:
        a joined string representation of this, with the newline (\n) as delimiter.

    - #### toArray

          public java.lang.String[] toArray()

      Specified by:
        `toArray` in interface `java.util.Collection<java.lang.String>`
      Specified by:
        `toArray` in interface `java.util.List<java.lang.String>`
      Overrides:
        `toArray` in class `java.util.ArrayList<java.lang.String>`
      Returns:
        an array of String

    - #### join

          public static java.lang.String join(java.util.Collection<java.lang.String> c,
                                              java.lang.String delim)

      The reverse of split - given a collection, takes each element and places it in a string, joined by a delimiter.

    - #### join

          public static java.lang.String join(java.lang.Object[] arr,
                                              java.lang.String delim)

      Parameters:
        `arr` - array of objects
        `delim` - delimiter to separate strings
      Returns:
        a single string with each element in arr converted to a string and concatenated, separated by delim.

    - #### join

          public java.lang.String join(java.lang.String delim)

      Non-static version, that joins "this" StringList.
      Parameters:
        `delim` - the delimiter
      Returns:
        a joined string with delim inbetween each element

    - #### main

          public static void main(java.lang.String[] args)