Package org.apache.uima.cas.impl
Class FSIntArrayIndex<T extends FeatureStructure>
java.lang.Object
org.apache.uima.cas.impl.FSLeafIndexImpl<T>
org.apache.uima.cas.impl.FSIntArrayIndex<T>
- Type Parameters:
T- the Java cover class type for this index, passed along to (wrapped) iterators producing Java cover classes
- All Implemented Interfaces:
Comparator<T>,FSIndexImpl,LowLevelIndex,IntComparator
Used for sorted indexes only
Uses IntVector (sorted) as the index (of FSs)
-
Field Summary
Fields inherited from class org.apache.uima.cas.impl.FSLeafIndexImpl
lowLevelCAS -
Method Summary
Modifier and TypeMethodDescriptionprotected voidFor serialization: get all the items in this index and bulk add to an IntVectorintcompare(int fs1, int fs2) Note: may return other than -1 , 0, and 1 (e.g., might return -6)booleanvoidMethod deleteFS.find(FeatureStructure fs) voidflush()final booleaninsert(int fs) booleanll_containsEq(int fsAddr) Get a low-level, FS reference iterator.pointerIterator(IntComparator comp, int[] detectIllegalIndexUpdates, int typeCode) The comp value is only used when ordering iterators in type/subtype collectionsprotected IntPointerIteratorprotected IntPointerIteratorrefIterator(int fsAddr) booleanremove(int fsRef) intsize()Get the number of FSs in this index.Methods inherited from class org.apache.uima.cas.impl.FSLeafIndexImpl
compare, equals, getComparator, getIndexingStrategy, getIntIterator, getType, hashCode, iterator, ll_compare, ll_iterator, ll_rootIterator, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Method Details
-
flush
public void flush() -
insert
public final boolean insert(int fs) -
pointerIterator
public ComparableIntPointerIterator<T> pointerIterator(IntComparator comp, int[] detectIllegalIndexUpdates, int typeCode) The comp value is only used when ordering iterators in type/subtype collections- Specified by:
pointerIteratorin classFSLeafIndexImpl<T extends FeatureStructure>
-
refIterator
- Specified by:
refIteratorin classFSLeafIndexImpl<T extends FeatureStructure>- See Also:
-
ll_iterator
Description copied from interface:LowLevelIndexGet a low-level, FS reference iterator.- Returns:
- An iterator for this index.
-
refIterator
- Specified by:
refIteratorin classFSLeafIndexImpl<T extends FeatureStructure>- See Also:
-
contains
- Parameters:
fs- the feature structure- Returns:
- true if the fs is contained
- See Also:
-
ll_containsEq
public boolean ll_containsEq(int fsAddr) -
find
-
size
public int size()Description copied from interface:LowLevelIndexGet the number of FSs in this index.- Returns:
- The size of this index.
- See Also:
-
deleteFS
Description copied from class:FSLeafIndexImplMethod deleteFS.- Specified by:
deleteFSin classFSLeafIndexImpl<T extends FeatureStructure>- Parameters:
fs- -- See Also:
-
remove
public boolean remove(int fsRef) -
bulkAddTo
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
-
compare
public int compare(int fs1, int fs2) Description copied from class:FSLeafIndexImplNote: may return other than -1 , 0, and 1 (e.g., might return -6)- Specified by:
comparein interfaceIntComparator- Overrides:
comparein classFSLeafIndexImpl<T extends FeatureStructure>- Parameters:
fs1- -fs2- -- Returns:
- 0 if equal, < 0 if fs1 < fs2, > 0 if fs1 > fs2
-