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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
copyToArray
(T[] target, int startingIndexInTarget) Copy FS refs to target from this index partboolean
getOfsa()
int
hashCode()
boolean
iterator()
void
Called by index when about to make an update This copy captures the state of things before the update happensfinal int
size()
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:
makeReadOnlyCopy
in interfaceCopyOnWriteIndexPart<T extends FeatureStructure>
-
isOriginal
public boolean isOriginal()- Specified by:
isOriginal
in 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:
size
in 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:
iterator
in interfaceCopyOnWriteIndexPart<T extends FeatureStructure>
- Returns:
- iterator over all the elements
-
copyToArray
Description copied from interface:CopyOnWriteIndexPart
Copy FS refs to target from this index part- Specified by:
copyToArray
in interfaceCopyOnWriteIndexPart<T extends FeatureStructure>
- Parameters:
target
- the target array to copy intostartingIndexInTarget
- the starting index in the target array- Returns:
- startingIndexInTarget + size
-