net.sf.molae.pipe.text
Class BreakTokenList
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.AbstractSequentialList
|
+--net.sf.molae.pipe.text.BreakTokenList
- All Implemented Interfaces:
- Collection, List
- public final class BreakTokenList
- extends AbstractSequentialList
A list that is based on a BreakIterator.
|
Method Summary |
ListIterator |
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.
- Overrides:
size in class AbstractCollection
- Returns:
- the number of elements in this list
listIterator
public ListIterator listIterator(int index)
- Creates a list iterator based on the underlying break iterator.
- Overrides:
listIterator in class AbstractSequentialList
- 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()).