Package org.eclipse.emf.common.util
Class SegmentSequence.StringArrayPool.SegmentsAccessUnit
java.lang.Object
org.eclipse.emf.common.util.Pool.AccessUnit<String[]>
org.eclipse.emf.common.util.SegmentSequence.StringArrayPool.AccessUnitBase
org.eclipse.emf.common.util.SegmentSequence.StringArrayPool.SegmentsAccessUnit
- Enclosing class:
- SegmentSequence.StringArrayPool
protected static final class SegmentSequence.StringArrayPool.SegmentsAccessUnit
extends SegmentSequence.StringArrayPool.AccessUnitBase
An Access unit for accessing segments that may need copying or interning.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe number of segments to consider.protected booleanWhether the segments need copying when interned.protected booleanWhether the strings with in the segments needto be interned.protected String[]The segments being access.Fields inherited from class org.eclipse.emf.common.util.SegmentSequence.StringArrayPool.AccessUnitBase
stringAccessUnit, substringAccessUnitFields inherited from class org.eclipse.emf.common.util.Pool.AccessUnit
createdEntry, entries, hashCode, matchingIndex, next, queue, values, valuesLength -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates an instance managed by the given queue. -
Method Summary
Modifier and TypeMethodDescriptionString[]Gets the value that should be added to the pool.protected booleanUsed to determine whether the given value from the pool is equal to the value being accessed.voidreset(boolean isExclusive) Prepare the access unit for reuse.protected booleansetArbitraryValue(Object value) Checks of the value is a string array and delegates tosetValue(String[])if that's the case..protected voidCaches the parameters and computes the hash code.protected voidDelegates tosetValue(true, true, value, value.length).Methods inherited from class org.eclipse.emf.common.util.SegmentSequence.StringArrayPool.AccessUnitBase
getValue, internString, internStringMethods inherited from class org.eclipse.emf.common.util.Pool.AccessUnit
add, getEntry, match, rematches
-
Field Details
-
needsCopying
protected boolean needsCopyingWhether the segments need copying when interned. -
needsToIntern
protected boolean needsToInternWhether the strings with in the segments needto be interned. -
segments
The segments being access. -
count
protected int countThe number of segments to consider.
-
-
Constructor Details
-
SegmentsAccessUnit
Creates an instance managed by the given queue.
-
-
Method Details
-
setValue
Delegates tosetValue(true, true, value, value.length).- Overrides:
setValuein classSegmentSequence.StringArrayPool.AccessUnitBase
-
setArbitraryValue
Checks of the value is a string array and delegates tosetValue(String[])if that's the case..- Overrides:
setArbitraryValuein classSegmentSequence.StringArrayPool.AccessUnitBase
-
setValue
Caches the parameters and computes the hash code. -
matches
Description copied from class:Pool.AccessUnitUsed to determine whether the given value from the pool is equal to the value being accessed. The default implementation usesObject.equals(Object).- Overrides:
matchesin classSegmentSequence.StringArrayPool.AccessUnitBase
-
getInternalizedValue
Description copied from class:Pool.AccessUnitGets the value that should be added to the pool. This can be specialized to internalized the value, e.g., to make a copy that uses minimal storage or is read only.- Overrides:
getInternalizedValuein classPool.AccessUnit<String[]>
-
reset
public void reset(boolean isExclusive) Description copied from class:Pool.AccessUnitPrepare the access unit for reuse. In particular remove the hard references to each element in both thePool.AccessUnit.valuesandPool.AccessUnit.entriesand then reset thePool.AccessUnit.valuesLengthto 0- Overrides:
resetin classPool.AccessUnit<String[]>
-