com.sparsity.dex.gdb
Class StringList

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

public class StringList
extends java.lang.Object
implements java.lang.Iterable<java.lang.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 Summary
StringList()
          Constructor.
StringList(java.util.Collection<java.lang.String> col)
          Creates a new instance from an string collection.
StringList(java.lang.String[] list)
          Creates a new instance from an string array.
 
Method Summary
 void add(java.lang.String str)
          Adds a String at the end of the list.
 void clear()
          Clears the list.
 int count()
          Number of elements in the list.
 StringListIterator iterator()
          Gets a new StringListIterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringList

public StringList(java.util.Collection<java.lang.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.


StringList

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

Parameters:
list - String array to initialize the instance.
Method Detail

clear

public void clear()
Clears the list.


iterator

public StringListIterator iterator()
Gets a new StringListIterator.

Specified by:
iterator in interface java.lang.Iterable<java.lang.String>
Returns:
StringListIterator instance.

count

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

Returns:
Number of elements in the list.

add

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

Parameters:
str - [in] String.