edu.stanford.nlp.util
Class PaddedList

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byedu.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

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
PaddedList(List l)
           
PaddedList(List l, Object padding)
           
 
Method Summary
 Object get(int i)
           
 int size()
           
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, 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

PaddedList

public PaddedList(List l)

PaddedList

public PaddedList(List l,
                  Object padding)
Method Detail

size

public int size()

get

public Object get(int i)


Stanford NLP Group