edu.stanford.nlp.util
Class CircleList

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

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
CircleList(List l)
           
 
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

CircleList

public CircleList(List l)
Method Detail

size

public int size()

get

public Object get(int i)


Stanford NLP Group