net.sf.molae.pipe.text
Class BreakTokenList
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.AbstractSequentialList<String>
net.sf.molae.pipe.text.BreakTokenList
- All Implemented Interfaces:
- Iterable<String>, Collection<String>, List<String>
public final class BreakTokenList
- extends AbstractSequentialList<String>
A list that is based on a BreakIterator.
|
Method Summary |
ListIterator<String> |
listIterator(int index)
Creates a list iterator based on the underlying break iterator. |
int |
size()
Returns the number of elements in this list. |
BreakTokenList
public BreakTokenList(BreakIterator breakIterator,
String text)
- Constructs a BreakTokenList object.
- Parameters:
breakIterator - base BreakIteratortext - base text
- Throws:
NullPointerException - if any of the specified objects is
null.
size
public int size()
- Returns the number of elements in this list.
- Specified by:
size in interface Collection<String>- Specified by:
size in interface List<String>- Specified by:
size in class AbstractCollection<String>
- Returns:
- the number of elements in this list
listIterator
public ListIterator<String> listIterator(int index)
- Creates a list iterator based on the underlying break iterator.
- Specified by:
listIterator in interface List<String>- Specified by:
listIterator in class AbstractSequentialList<String>
- Parameters:
index - index of first element to be returned from the
list iterator (by a call to the next method).
- Returns:
- a list iterator based on the underlying break iterator
- Throws:
IndexOutOfBoundsException - if the index is out of range (index
< 0 || index > size()).