Class StringList

java.lang.Object
com.sparsity.sparksee.gdb.StringList
All Implemented Interfaces:
Iterable<String>

public class StringList extends Object implements Iterable<String>
String list.

It stores a String (unicode) list.

Use StringListIterator to access all elements into this collection.

Author:
Sparsity Technologies http://www.sparsity-technologies.com
  • Constructor Details

    • StringList

      public StringList(String[] list)
      Creates a new instance from an string array.

      Parameters:
      list - String array to initialize the instance.
    • StringList

      public StringList(Collection<String> col)
      Creates a new instance from an string collection.

      Parameters:
      col - Collection to initialize the instance.
    • StringList

      public StringList()
      Constructor.

      This creates an empty list.

  • Method Details

    • clear

      public void clear()
      Clears the list.

    • iterator

      public StringListIterator iterator()
      Gets a new StringListIterator.

      Specified by:
      iterator in interface Iterable<String>
      Returns:
      StringListIterator instance.
    • add

      public void add(String str)
      Adds a String at the end of the list.

      Parameters:
      str - [in] String.
    • count

      public int count()
      Number of elements in the list.

      Returns:
      Number of elements in the list.