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 java.lang.Object implements CopyOnWriteIndexPart<T>
implements OrderedFsSet_array partially, for iterator use
-
-
Field Summary
Fields Modifier and Type Field Description T[]ainta_firstUsedslotinta_nextFreeslotOrderedFsSet_array<T>originalprivate intoriginal_sizeprivate OrderedFsSet_array<T>set
-
Constructor Summary
Constructors Constructor Description CopyOnWriteOrderedFsSet_array(OrderedFsSet_array<T> original)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcopyToArray(T[] target, int startingIndexInTarget)Copy FS refs to target from this index partbooleanequals(java.lang.Object obj)OrderedFsSet_array<T>getOfsa()inthashCode()booleanisOriginal()java.util.Iterator<T>iterator()voidmakeReadOnlyCopy()Called by index when about to make an update This copy captures the state of things before the update happensintsize()java.lang.StringtoString()
-
-
-
Field Detail
-
set
private OrderedFsSet_array<T extends FeatureStructure> set
-
a_firstUsedslot
public final int a_firstUsedslot
-
a_nextFreeslot
public final int a_nextFreeslot
-
original
public final OrderedFsSet_array<T extends FeatureStructure> original
-
original_size
private final int original_size
-
a
public T extends FeatureStructure[] a
-
-
Constructor Detail
-
CopyOnWriteOrderedFsSet_array
public CopyOnWriteOrderedFsSet_array(OrderedFsSet_array<T> original)
-
-
Method Detail
-
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()
- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(java.lang.Object)
-
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:
OrderedFsSet_array.size()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
OrderedFsSet_array.toString()
-
getOfsa
public OrderedFsSet_array<T> getOfsa()
-
iterator
public java.util.Iterator<T> iterator()
- Specified by:
iteratorin interfaceCopyOnWriteIndexPart<T extends FeatureStructure>- Returns:
- iterator over all the elements
-
copyToArray
public int copyToArray(T[] target, int startingIndexInTarget)
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
-
-