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:
java.util.Comparator<T>
,FSIndexImpl
,LowLevelIndex
,IntComparator
public class FSIntArrayIndex<T extends FeatureStructure> extends FSLeafIndexImpl<T>
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
bulkAddTo(IntVector v)
For serialization: get all the items in this index and bulk add to an IntVectorint
compare(int fs1, int fs2)
Note: may return other than -1 , 0, and 1 (e.g., might return -6)boolean
contains(FeatureStructure fs)
void
deleteFS(FeatureStructure fs)
Method deleteFS.FeatureStructure
find(FeatureStructure fs)
void
flush()
boolean
insert(int fs)
boolean
ll_containsEq(int fsAddr)
LowLevelIterator
ll_iterator()
Get a low-level, FS reference iterator.ComparableIntPointerIterator<T>
pointerIterator(IntComparator comp, int[] detectIllegalIndexUpdates, int typeCode)
The comp value is only used when ordering iterators in type/subtype collectionsprotected IntPointerIterator
refIterator()
protected IntPointerIterator
refIterator(int fsAddr)
boolean
remove(int fsRef)
int
size()
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, toString
-
-
-
-
Method Detail
-
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:
pointerIterator
in classFSLeafIndexImpl<T extends FeatureStructure>
-
refIterator
protected IntPointerIterator refIterator()
- Specified by:
refIterator
in classFSLeafIndexImpl<T extends FeatureStructure>
- See Also:
FSLeafIndexImpl.refIterator()
-
ll_iterator
public LowLevelIterator ll_iterator()
Description copied from interface:LowLevelIndex
Get a low-level, FS reference iterator.- Returns:
- An iterator for this index.
-
refIterator
protected IntPointerIterator refIterator(int fsAddr)
- Specified by:
refIterator
in classFSLeafIndexImpl<T extends FeatureStructure>
- See Also:
FSLeafIndexImpl.refIterator(int)
-
contains
public boolean contains(FeatureStructure fs)
- Parameters:
fs
- the feature structure- Returns:
- true if the fs is contained
- See Also:
FSIndex.contains(FeatureStructure)
-
ll_containsEq
public boolean ll_containsEq(int fsAddr)
-
find
public FeatureStructure find(FeatureStructure fs)
-
size
public int size()
Description copied from interface:LowLevelIndex
Get 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:FSLeafIndexImpl
Method deleteFS.- Specified by:
deleteFS
in classFSLeafIndexImpl<T extends FeatureStructure>
- Parameters:
fs
- -- See Also:
FSLeafIndexImpl.deleteFS(org.apache.uima.cas.FeatureStructure)
-
remove
public boolean remove(int fsRef)
-
bulkAddTo
protected void bulkAddTo(IntVector v)
Description copied from class:FSLeafIndexImpl
For serialization: get all the items in this index and bulk add to an IntVector- Specified by:
bulkAddTo
in classFSLeafIndexImpl<T extends FeatureStructure>
- Parameters:
v
- the set of items to add
-
compare
public int compare(int fs1, int fs2)
Description copied from class:FSLeafIndexImpl
Note: may return other than -1 , 0, and 1 (e.g., might return -6)- Specified by:
compare
in interfaceIntComparator
- Overrides:
compare
in classFSLeafIndexImpl<T extends FeatureStructure>
- Parameters:
fs1
- -fs2
- -- Returns:
- 0 if equal, < 0 if fs1 < fs2, > 0 if fs1 > fs2
-
-