## 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
`StringList()`
`StringList(java.lang.Object[] array)`

Method Summary
`void` `addAll(java.lang.Object[] array)`
`static java.lang.String` `join(java.util.Collection 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, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, trimToSize`

Methods inherited from class java.util.AbstractList
`equals, hashCode, iterator, listIterator, listIterator, subList`

Methods inherited from class java.util.AbstractCollection
`containsAll, removeAll, retainAll`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.List
`containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList`

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 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)