protected static class SegmentSequence.SegmentSequencePool.StringAccessUnit extends SegmentSequence.SegmentSequencePool.AccessUnitBase
Modifier and Type | Class and Description |
---|---|
protected static class |
SegmentSequence.SegmentSequencePool.StringAccessUnit.Queue |
Modifier and Type | Field and Description |
---|---|
protected char[] |
buffer
A buffer for character level processing; it grows as needed.
|
protected org.eclipse.emf.common.util.CommonUtil.StringPool.CharactersAccessUnit |
charactersAccessUnit
An access unit for exclusive use in
internString(char[], int, int, int) . |
protected java.lang.String |
delimiter
The delimiter of the value being accessed.
|
protected char[] |
delimiterBuffer
A buffer to hold the delimiter's characters; it grows as needed.
|
protected java.lang.String[] |
segmentBuffer
A buffer for building up string segments; it grows as needed.
|
protected java.lang.String |
string
The value being access.
|
createdEntry, entries, hashCode, matchingIndex, next, queue, values, valuesLength
Modifier | Constructor and Description |
---|---|
protected |
SegmentSequence.SegmentSequencePool.StringAccessUnit(SegmentSequence.SegmentSequencePool.StringAccessUnit.Queue queue)
Create an instance managed by the given queue.
|
Modifier and Type | Method and Description |
---|---|
protected void |
ensureSegmentCapacity(int segmentCount)
Ensures that the segment buffer is give enough to hold the given number of segments.
|
SegmentSequence |
getInternalizedValue()
Gets the value that should be added to the pool.
|
protected java.lang.String |
internString(char[] characters,
int offset,
int count,
int hashCode) |
protected boolean |
matches(SegmentSequence value)
Used to determine whether the given value from the pool is equal to the value being accessed.
|
void |
reset(boolean isExclusive)
Prepare the access unit for reuse.
|
protected void |
setValue(java.lang.String delimiter,
java.lang.String value)
Records the parameters and computes the hash code.
|
getValue, hashCode, setArbitraryValue, setValue
add, getEntry, match, rematches
protected char[] buffer
protected char[] delimiterBuffer
protected java.lang.String[] segmentBuffer
protected java.lang.String delimiter
protected java.lang.String string
protected org.eclipse.emf.common.util.CommonUtil.StringPool.CharactersAccessUnit charactersAccessUnit
internString(char[], int, int, int)
.protected SegmentSequence.SegmentSequencePool.StringAccessUnit(SegmentSequence.SegmentSequencePool.StringAccessUnit.Queue queue)
queue
- protected java.lang.String internString(char[] characters, int offset, int count, int hashCode)
protected void setValue(java.lang.String delimiter, java.lang.String value)
public SegmentSequence getInternalizedValue()
Pool.AccessUnit
getInternalizedValue
in class Pool.AccessUnit<SegmentSequence>
protected boolean matches(SegmentSequence value)
Pool.AccessUnit
Object.equals(Object)
.matches
in class Pool.AccessUnit<SegmentSequence>
protected void ensureSegmentCapacity(int segmentCount)
public void reset(boolean isExclusive)
Pool.AccessUnit
#getValues()
and #getEntries()
and then reset the Pool.AccessUnit.valuesLength
to 0reset
in class Pool.AccessUnit<SegmentSequence>