edu.stanford.nlp.util
Class PaddedList
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
edu.stanford.nlp.util.PaddedList
- All Implemented Interfaces:
- Collection, List
- public class PaddedList
- extends AbstractList
A PaddedList wraps another list, presenting an apparently infinite
list by padding outside the real confines of the list with a default
value. Note that size()
returns the true size, but
get()
works for any number.
- Author:
- Christopher Manning
Methods inherited from class java.util.AbstractList |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
PaddedList
public PaddedList(List l)
PaddedList
public PaddedList(List l,
Object padding)
size
public int size()
get
public Object get(int i)
Stanford NLP Group