protected static final class SegmentSequence.StringArrayPool.SegmentsAccessUnit extends SegmentSequence.StringArrayPool.AccessUnitBase
Modifier and Type | Class and Description |
---|---|
protected static class |
SegmentSequence.StringArrayPool.SegmentsAccessUnit.Queue |
Modifier and Type | Field and Description |
---|---|
protected int |
count
The number of segments to consider.
|
protected boolean |
needsCopying
Whether the segments need copying when interned.
|
protected boolean |
needsToIntern
Whether the strings with in the segments needto be interned.
|
protected java.lang.String[] |
segments
The segments being access.
|
stringAccessUnit, substringAccessUnit
createdEntry, entries, hashCode, matchingIndex, next, queue, values, valuesLength
Modifier | Constructor and Description |
---|---|
protected |
SegmentSequence.StringArrayPool.SegmentsAccessUnit(SegmentSequence.StringArrayPool.SegmentsAccessUnit.Queue queue)
Creates an instance managed by the given queue.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getInternalizedValue()
Gets the value that should be added to the pool.
|
protected boolean |
matches(java.lang.String[] 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 boolean |
setArbitraryValue(java.lang.Object value)
Checks of the value is a string array and delegates to
setValue(String[]) if that's the case.. |
protected void |
setValue(boolean needsCopying,
boolean needsToIntern,
java.lang.String[] segments,
int count)
Caches the parameters and computes the hash code.
|
protected void |
setValue(java.lang.String[] value)
Delegates to
setValue (true, true, value, value.length) . |
getValue, internString, internString
add, getEntry, match, rematches
protected boolean needsCopying
protected boolean needsToIntern
protected java.lang.String[] segments
protected int count
protected SegmentSequence.StringArrayPool.SegmentsAccessUnit(SegmentSequence.StringArrayPool.SegmentsAccessUnit.Queue queue)
queue
- protected void setValue(java.lang.String[] value)
setValue
(true, true, value, value.length)
.setValue
in class SegmentSequence.StringArrayPool.AccessUnitBase
protected boolean setArbitraryValue(java.lang.Object value)
setValue(String[])
if that's the case..setArbitraryValue
in class SegmentSequence.StringArrayPool.AccessUnitBase
protected void setValue(boolean needsCopying, boolean needsToIntern, java.lang.String[] segments, int count)
protected boolean matches(java.lang.String[] value)
Pool.AccessUnit
Object.equals(Object)
.matches
in class SegmentSequence.StringArrayPool.AccessUnitBase
public java.lang.String[] getInternalizedValue()
Pool.AccessUnit
getInternalizedValue
in class Pool.AccessUnit<java.lang.String[]>
public void reset(boolean isExclusive)
Pool.AccessUnit
#getValues()
and #getEntries()
and then reset the Pool.AccessUnit.valuesLength
to 0reset
in class Pool.AccessUnit<java.lang.String[]>