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.


Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
BreakTokenList(BreakIterator breakIterator, String text)
          Constructs a BreakTokenList object.
 
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.
 
Methods inherited from class java.util.AbstractSequentialList
add, addAll, get, iterator, remove, set
 
Methods inherited from class java.util.AbstractList
add, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

BreakTokenList

public BreakTokenList(BreakIterator breakIterator,
                      String text)
Constructs a BreakTokenList object.
Parameters:
breakIterator - base BreakIterator
text - base text
Throws:
NullPointerException - if any of the specified objects is null.
Method Detail

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