org.apache.uima.cas.impl
Class FSBagIndex

java.lang.Object
  extended by org.apache.uima.cas.impl.FSLeafIndexImpl
      extended by org.apache.uima.cas.impl.FSBagIndex
All Implemented Interfaces:
java.lang.Iterable, FSIndex, FSIndexImpl, LowLevelIndex, IntComparator

public class FSBagIndex
extends FSLeafIndexImpl


Field Summary
 
Fields inherited from class org.apache.uima.cas.impl.FSLeafIndexImpl
lowLevelCAS
 
Fields inherited from interface org.apache.uima.cas.FSIndex
BAG_INDEX, DEFAULT_BAG_INDEX, SET_INDEX, SORTED_INDEX
 
Method Summary
 int compare(int fs1, int fs2)
          Compare two ints.
 boolean contains(FeatureStructure fs)
          Check if the index contains an element equal to the given feature structure according to the ordering of the index.
 void deleteFS(FeatureStructure fs)
          Method deleteFS.
 FeatureStructure find(FeatureStructure fs)
          Find an entry in the index equal to the given feature structure according to the ordering of the index.
 void flush()
           
 int hashCode()
           
 boolean insert(int fs)
           
 LowLevelIterator ll_iterator()
          Get a low-level, FS reference iterator.
 ComparableIntPointerIterator pointerIterator(IntComparator comp, int[] detectIllegalIndexUpdates, int typeCode)
           
protected  IntPointerIterator refIterator()
           
protected  IntPointerIterator refIterator(int fsCode)
           
 void remove(int fsRef)
           
 int size()
          Return the number of feature structures in this index.
 
Methods inherited from class org.apache.uima.cas.impl.FSLeafIndexImpl
compare, equals, getComparator, getIndexingStrategy, getIntIterator, getType, iterator, iterator, ll_compare, ll_iterator, ll_rootIterator
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

flush

public void flush()

insert

public final boolean insert(int fs)

compare

public int compare(int fs1,
                   int fs2)
Description copied from interface: IntComparator
Compare two ints.

Specified by:
compare in interface IntComparator
Overrides:
compare in class FSLeafIndexImpl
Parameters:
fs1 - first int.
fs2 - second int.
Returns:
-1 if i < j; 1 if i > j; 0 if i == j.

pointerIterator

public ComparableIntPointerIterator pointerIterator(IntComparator comp,
                                                    int[] detectIllegalIndexUpdates,
                                                    int typeCode)
Specified by:
pointerIterator in class FSLeafIndexImpl

refIterator

protected IntPointerIterator refIterator()
Specified by:
refIterator in class FSLeafIndexImpl
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 fsCode)
Specified by:
refIterator in class FSLeafIndexImpl
See Also:
FSLeafIndexImpl.refIterator(int)

contains

public boolean contains(FeatureStructure fs)
Description copied from interface: FSIndex
Check if the index contains an element equal to the given feature structure according to the ordering of the index. Note that this is in general not the same as feature structure identity.

Parameters:
fs - The FS we're looking for.
Returns:
true if the index contains such an element.
See Also:
FSIndex.contains(FeatureStructure)

find

public FeatureStructure find(FeatureStructure fs)
Description copied from interface: FSIndex
Find an entry in the index equal to the given feature structure according to the ordering of the index. Note that this is in general not the same as feature structure identity.

Parameters:
fs - The FS we're looking for.
Returns:
A FS equal to fs, or null if no such FS exists.
See Also:
FSIterator.moveTo(FeatureStructure)

size

public int size()
Description copied from interface: FSIndex
Return the number of feature structures in this index.

Returns:
The number of FSs in this index.
See Also:
FSIndex.size()

deleteFS

public void deleteFS(FeatureStructure fs)
Description copied from class: FSLeafIndexImpl
Method deleteFS.

Specified by:
deleteFS in class FSLeafIndexImpl
See Also:
FSLeafIndexImpl.deleteFS(org.apache.uima.cas.FeatureStructure)

remove

public void remove(int fsRef)

hashCode

public int hashCode()
Overrides:
hashCode in class FSLeafIndexImpl


Copyright © 2013. All Rights Reserved.