T - the Java class type for this indexpublic class FsIndex_flat<T extends FeatureStructure> extends FsIndex_singletype<T>
casImpl, comparatorForIndexSpecs, comparatorNoTypeWithID, comparatorNoTypeWithoutID, comparatorWithID, comparatorWithoutID, isAnnotIdx, type, wr_cowFS_ID_COMPARATOR, IS_ORDERED, IS_TYPE_ORDERBAG_INDEX, DEFAULT_BAG_INDEX, SET_INDEX, SORTED_INDEX| Modifier and Type | Method and Description |
|---|---|
protected void |
bulkAddTo(org.apache.uima.internal.util.IntVector v) |
protected void |
bulkAddTo(List<T> v)
For serialization: get all the items in this index and bulk add to an
List<T>
|
int |
compare(FeatureStructure fs1,
FeatureStructure fs2)
This is required to avoid compilation error (but not in Eclipse) due to
ambiguous interface inheritance from both FeatureStructure and Comparator
|
boolean |
contains(FeatureStructure fs)
Check if the index contains an element equal to the given feature structure
according to the comparators defined for this index.
|
protected CopyOnWriteIndexPart |
createCopyOnWriteIndexPart() |
boolean |
deleteFS(T fs) |
T |
find(FeatureStructure fs)
Find an entry in the index "equal to" the given feature structure according to the comparators specified
for this index.
|
LowLevelIterator<T> |
iterator()
Return an iterator over the index.
|
LowLevelIterator<T> |
iterator(boolean orderNotNeeded,
boolean ignoreType)
Internal use, used by select framework.
|
int |
ll_maxAnnotSpan() |
int |
size()
Return the number of feature structures in this index.
|
assertFsTypeMatchesIndexType, compare, equals, flush, getCasImpl, getComparator, getComparatorForIndexSpecs, getComparatorImplForIndexSpecs, getCopyOnWriteIndexPart, getIndexingStrategy, getNonNullCow, getType, getTypeImpl, hashCode, isSorted, iterator, ll_compare, ll_iterator, maybeCopy, toString, withSnapshotIteratorsadd, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLonggetIntIterator, getSubIndex, getSubIndex, ll_iterator, select, select, select, select, selectadd, addAll, clear, contains, containsAll, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, toArray, toArraypublic LowLevelIterator<T> iterator()
LowLevelIndexiterator in interface Iterable<T extends FeatureStructure>iterator in interface Collection<T extends FeatureStructure>iterator in interface FSIndex<T extends FeatureStructure>iterator in interface LowLevelIndex<T extends FeatureStructure>iterator in class AbstractCollection<T extends FeatureStructure>public LowLevelIterator<T> iterator(boolean orderNotNeeded, boolean ignoreType)
LowLevelIndexorderNotNeeded - if true, skips work while iterating to keep iterators over multiple types in sync.ignoreType - if true, the comparator used for moveTo leftmost operations
will ignore typeOrder keys, if the index happens to define thesepublic boolean contains(FeatureStructure fs)
FSIndexCheck if the index contains an element equal to the given feature structure according to the comparators defined for this index. For bag indexes (which have no comparators), the equality test means the identical feature structure. Note that this is in general not the same as feature structure identity.
The element is used as a template, and may be a supertype of the type of the index, as long as the keys specified for this index can be accessed.
fs - A Feature Structure used a template to match for equality with the
FSs in the index.true if the index contains such an element.public T find(FeatureStructure fs)
FSIndexfs - A Feature Structure used a template to match with the Feature Structures in the index.
It must have the keys needed to do the compare as specified for the index that it's in.null if no such FS exists.FSIterator.moveTo(FeatureStructure)public int size()
FSIndexsize in interface Collection<T extends FeatureStructure>size in interface FSIndex<T extends FeatureStructure>size in class AbstractCollection<T extends FeatureStructure>FSIndex.size()public boolean deleteFS(T fs)
fs - - the Feature Structure to be removed. Only this exact Feature
Structure is removed (this is a stronger test than, for example,
what moveTo(fs) does, where the fs in that case is used as a
template). It is not an error if this exact Feature Structure is
not in an index.FsIndex_singletype.deleteFS(FeatureStructure)protected void bulkAddTo(List<T> v)
FsIndex_singletypebulkAddTo in class FsIndex_singletype<T extends FeatureStructure>v - the set of items to addprotected void bulkAddTo(org.apache.uima.internal.util.IntVector v)
public int compare(FeatureStructure fs1, FeatureStructure fs2)
FsIndex_singletypecompare in interface Comparator<FeatureStructure>compare in interface FSIndex<T extends FeatureStructure>compare in class FsIndex_singletype<T extends FeatureStructure>fs1 - the first Feature Structure to comparefs2 - the second Feature Structure to compare-1 if fs1 < fs2; 0 if
fs1 = fs2; 1 else.FSIndex.compare(FeatureStructure, FeatureStructure)protected CopyOnWriteIndexPart createCopyOnWriteIndexPart()
createCopyOnWriteIndexPart in class FsIndex_singletype<T extends FeatureStructure>public int ll_maxAnnotSpan()
Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.