Package org.apache.uima.internal.util
Class CopyOnWriteOrderedFsSet_array<T extends FeatureStructure>
java.lang.Object
org.apache.uima.internal.util.CopyOnWriteOrderedFsSet_array<T>
- All Implemented Interfaces:
CopyOnWriteIndexPart<T>
public class CopyOnWriteOrderedFsSet_array<T extends FeatureStructure>
extends Object
implements CopyOnWriteIndexPart<T>
implements OrderedFsSet_array partially, for iterator use
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcopyToArray(T[] target, int startingIndexInTarget) Copy FS refs to target from this index partbooleangetOfsa()inthashCode()booleaniterator()voidCalled by index when about to make an update This copy captures the state of things before the update happensfinal intsize()toString()
-
Field Details
-
a_firstUsedslot
public final int a_firstUsedslot -
a_nextFreeslot
public final int a_nextFreeslot -
original
-
a
-
-
Constructor Details
-
CopyOnWriteOrderedFsSet_array
-
-
Method Details
-
makeReadOnlyCopy
public void makeReadOnlyCopy()Called by index when about to make an update This copy captures the state of things before the update happens- Specified by:
makeReadOnlyCopyin interfaceCopyOnWriteIndexPart<T extends FeatureStructure>
-
isOriginal
public boolean isOriginal()- Specified by:
isOriginalin interfaceCopyOnWriteIndexPart<T extends FeatureStructure>- Returns:
- true if this cow version is the same as the original. true means the index has not been updated
-
hashCode
public int hashCode() -
equals
-
size
public final int size()- Specified by:
sizein interfaceCopyOnWriteIndexPart<T extends FeatureStructure>- Returns:
- the size of this version of the index (maybe not the current index size)
- See Also:
-
toString
-
getOfsa
-
iterator
- Specified by:
iteratorin interfaceCopyOnWriteIndexPart<T extends FeatureStructure>- Returns:
- iterator over all the elements
-
copyToArray
Description copied from interface:CopyOnWriteIndexPartCopy FS refs to target from this index part- Specified by:
copyToArrayin interfaceCopyOnWriteIndexPart<T extends FeatureStructure>- Parameters:
target- the target array to copy intostartingIndexInTarget- the starting index in the target array- Returns:
- startingIndexInTarget + size
-