edu.stanford.nlp.util
Class CircleList
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
edu.stanford.nlp.util.CircleList
- All Implemented Interfaces:
- Collection, List
- public class CircleList
- extends AbstractList
A CircleList wraps another list, presenting an apparently infinite
list by wrapping around all requests for an item, as if the list were
circular. Note that size()
returns the true size, but
get()
works for any number.
- Author:
- Dan Klein, Christopher Manning
Methods inherited from class java.util.AbstractList |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
CircleList
public CircleList(List l)
size
public int size()
get
public Object get(int i)
Stanford NLP Group