Package org.eclipse.emf.common.util
Class SegmentSequence.SegmentSequencePool.SegmentsAndSegmentsAccessUnit
java.lang.Object
org.eclipse.emf.common.util.Pool.AccessUnit<SegmentSequence>
org.eclipse.emf.common.util.SegmentSequence.SegmentSequencePool.AccessUnitBase
org.eclipse.emf.common.util.SegmentSequence.SegmentSequencePool.SegmentsAndSegmentsAccessUnit
- Enclosing class:
SegmentSequence.SegmentSequencePool
protected static class SegmentSequence.SegmentSequencePool.SegmentsAndSegmentsAccessUnit
extends SegmentSequence.SegmentSequencePool.AccessUnitBase
An access units for accessing the composition of two sets of segments.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe delimiter being accessed.protected booleanWhether the strings in the second segments need interning.protected String[]The first segments being accessed.protected String[]The second segments being accessed.Fields inherited from class org.eclipse.emf.common.util.Pool.AccessUnit
createdEntry, entries, hashCode, matchingIndex, next, queue, values, valuesLength -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSegmentsAndSegmentsAccessUnit(SegmentSequence.SegmentSequencePool.SegmentsAndSegmentsAccessUnit.Queue queue) -
Method Summary
Modifier and TypeMethodDescriptionGets the value that should be added to the pool.protected booleanmatches(SegmentSequence value) Used 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 voidsetValue(int hashCode, String delimiter, String[] segments1, String[] segments2, boolean needsToIntern) Caches the parameters and computes the hash code.Methods inherited from class org.eclipse.emf.common.util.SegmentSequence.SegmentSequencePool.AccessUnitBase
getValue, hashCode, setArbitraryValue, setValueMethods inherited from class org.eclipse.emf.common.util.Pool.AccessUnit
add, getEntry, match, rematches
-
Field Details
-
delimiter
The delimiter being accessed. -
segments1
The first segments being accessed. -
segments2
The second segments being accessed. -
needsToIntern
protected boolean needsToInternWhether the strings in the second segments need interning.
-
-
Constructor Details
-
SegmentsAndSegmentsAccessUnit
protected SegmentsAndSegmentsAccessUnit(SegmentSequence.SegmentSequencePool.SegmentsAndSegmentsAccessUnit.Queue queue)
-
-
Method Details
-
setValue
protected void setValue(int hashCode, String delimiter, String[] segments1, String[] segments2, boolean needsToIntern) Caches the parameters and computes the hash code. -
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<SegmentSequence>
-
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 classPool.AccessUnit<SegmentSequence>
-
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<SegmentSequence>
-