edu.stanford.nlp.dbm
Class DBIndexedSet

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--edu.stanford.nlp.dbm.DBIndexedSet
All Implemented Interfaces:
Collection, IndexedSet, List, Set

public class DBIndexedSet
extends AbstractList
implements IndexedSet

Implementation of IndexedSet which uses a List and a SimpleDatabase: the List to store index-object pairs, and the SimpleDatabase to store object-index pairs


Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
DBIndexedSet(List ind_obj, SimpleDatabase obj_ind)
           
 
Method Summary
 boolean add(Object o)
           
 Object get(int index)
           
 int indexOf(Object o)
           
 int size()
           
 
Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, 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
add, addAll, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray
 
Methods inherited from interface java.util.Set
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

DBIndexedSet

public DBIndexedSet(List ind_obj,
                    SimpleDatabase obj_ind)
Method Detail

indexOf

public int indexOf(Object o)
Specified by:
indexOf in interface List
Overrides:
indexOf in class AbstractList

get

public Object get(int index)
Specified by:
get in interface List
Specified by:
get in class AbstractList

size

public int size()
Specified by:
size in interface List
Specified by:
size in class AbstractCollection

add

public boolean add(Object o)
Specified by:
add in interface List
Overrides:
add in class AbstractList


Stanford NLP Group