Package org.apache.uima.cas.impl
Class FSRBTSetIndex<T extends FeatureStructure>
- java.lang.Object
-
- org.apache.uima.cas.impl.FSLeafIndexImpl<T>
-
- org.apache.uima.cas.impl.FSRBTSetIndex<T>
-
- Type Parameters:
T- the Java cover class type for this index, passed along to (wrapped) iterators producing Java cover classes
- All Implemented Interfaces:
java.util.Comparator<T>,FSIndexImpl,LowLevelIndex,IntComparator
public class FSRBTSetIndex<T extends FeatureStructure> extends FSLeafIndexImpl<T>
Used for UIMA FS Set Indexes Uses CompIntArrayRBT red black tree to hold items Same as FSRBTIndex, but duplicates are not inserted.
-
-
Field Summary
-
Fields inherited from class org.apache.uima.cas.impl.FSLeafIndexImpl
lowLevelCAS
-
-
Constructor Summary
Constructors Constructor Description FSRBTSetIndex(CASImpl cas, Type type, int indexType)Constructor for FSRBTIndex.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbulkAddTo(IntVector v)For serialization: get all the items in this index and bulk add to an IntVectorbooleancontains(FeatureStructure fs)voiddeleteFS(FeatureStructure fs)Method deleteFS.FeatureStructurefind(FeatureStructure fs)voidflush()LowLevelIteratorll_iterator()Get a low-level, FS reference iterator.ComparableIntPointerIterator<T>pointerIterator(IntComparator comp, int[] detectIllegalIndexUpdates, int typeCode)IntPointerIteratorrefIterator()protected IntPointerIteratorrefIterator(int fsCode)voidsetTree(CompIntArrayRBT compIntArrayRBT)intsize()Get the number of FSs in this index.-
Methods inherited from class org.apache.uima.cas.impl.FSLeafIndexImpl
compare, compare, equals, getComparator, getIndexingStrategy, getIntIterator, getType, hashCode, iterator, ll_compare, ll_iterator, ll_rootIterator, toString
-
-
-
-
Method Detail
-
flush
public void flush()
-
find
public FeatureStructure find(FeatureStructure fs)
-
refIterator
public IntPointerIterator refIterator()
- Specified by:
refIteratorin classFSLeafIndexImpl<T extends FeatureStructure>
-
pointerIterator
public ComparableIntPointerIterator<T> pointerIterator(IntComparator comp, int[] detectIllegalIndexUpdates, int typeCode)
- Specified by:
pointerIteratorin classFSLeafIndexImpl<T extends FeatureStructure>
-
refIterator
protected IntPointerIterator refIterator(int fsCode)
- Specified by:
refIteratorin classFSLeafIndexImpl<T extends FeatureStructure>- See Also:
FSLeafIndexImpl.refIterator(int)
-
contains
public boolean contains(FeatureStructure fs)
- Parameters:
fs- feature structure- Returns:
- true if the set contains the feature structure
- See Also:
FSIndex.contains(FeatureStructure)
-
size
public int size()
Description copied from interface:LowLevelIndexGet the number of FSs in this index.- Returns:
- The size of this index.
- See Also:
FSIndex.size()
-
deleteFS
public void deleteFS(FeatureStructure fs)
Description copied from class:FSLeafIndexImplMethod deleteFS.- Specified by:
deleteFSin classFSLeafIndexImpl<T extends FeatureStructure>- Parameters:
fs- -- See Also:
FSLeafIndexImpl.deleteFS(org.apache.uima.cas.FeatureStructure)
-
ll_iterator
public LowLevelIterator ll_iterator()
Description copied from interface:LowLevelIndexGet a low-level, FS reference iterator.- Returns:
- An iterator for this index.
-
bulkAddTo
protected void bulkAddTo(IntVector v)
Description copied from class:FSLeafIndexImplFor serialization: get all the items in this index and bulk add to an IntVector- Specified by:
bulkAddToin classFSLeafIndexImpl<T extends FeatureStructure>- Parameters:
v- the set of items to add
-
setTree
public void setTree(CompIntArrayRBT compIntArrayRBT)
-
-