protected static class URI.URIPool.StringAccessUnit extends URI.URIPool.URIPoolAccessUnitBase
Modifier and Type | Class and Description |
---|---|
protected static class |
URI.URIPool.StringAccessUnit.Queue |
Modifier and Type | Field and Description |
---|---|
protected int |
findHashCode
The cached hash code computed by
findMajorSeparator(int, String, int) and findSegmentEnd(int, String, int) . |
protected char |
findTerminatingCharacter
The cached terminating character computed by
findMajorSeparator(int, String, int) and findSegmentEnd(int, String, int) . |
protected URI.URIPool |
pool
This unit's pool.
|
protected SegmentSequence.StringArrayPool.SegmentsAndSubsegmentAccessUnit |
stringArraySegmentsAndSubsegmentAccessUnit
An access unit for exclusive use in
internArray(int, String[], int, String, int, int, int) . |
protected SegmentSequence.StringArrayPool.SubstringAccessUnit |
stringArraySubstringAccessUnit
An access unit for exclusive use in
internArray(String, int, int, int) . |
protected java.lang.String |
value
The value being accessed.
|
charactersAccessUnit, stringAccessUnit, stringArraySegmentsAndSegmentCountAccessUnit, stringPoolEntry, substringAccessUnit
createdEntry, entries, hashCode, matchingIndex, next, queue, values, valuesLength
Modifier | Constructor and Description |
---|---|
protected |
URI.URIPool.StringAccessUnit(URI.URIPool.StringAccessUnit.Queue queue,
URI.URIPool pool)
Creates an instance managed by this queue and pool.
|
Modifier and Type | Method and Description |
---|---|
protected int |
findMajorSeparator(int length,
java.lang.String s,
int i)
Looks for a '/', ':', or '?'
|
protected int |
findSegmentEnd(int length,
java.lang.String s,
int i)
Looks for a '/', or '?'
|
URI |
getInternalizedValue()
Gets the value that should be added to the pool.
|
protected java.lang.String[] |
internArray(int hashCode,
java.lang.String[] segments,
int segmentCount,
java.lang.String segment,
int offset,
int count,
int segmentHashCode) |
protected java.lang.String[] |
internArray(java.lang.String segment,
int offset,
int count,
int hashCode) |
URI |
match()
Used to return a value from among the
Pool.AccessUnit.values that Pool.AccessUnit.matches(Object) the value being accessed. |
protected boolean |
matches(URI value)
Used to determine whether the given value from the pool is equal to the value being accessed.
|
protected URI |
parseIntoURI(java.lang.String uri)
A string-parsing implementation.
|
void |
reset(boolean isExclusive)
Prepare the access unit for reuse.
|
protected void |
setValue(java.lang.String value)
Caches the parameters.
|
protected void |
setValue(java.lang.String value,
int hashCode)
Caches the parameters.
|
getValue, intern, intern, intern, intern, intern, intern, internArray, setArbitraryValue, setValue
add, getEntry, rematches
protected final URI.URIPool pool
protected java.lang.String value
protected int findHashCode
findMajorSeparator(int, String, int)
and findSegmentEnd(int, String, int)
.protected char findTerminatingCharacter
findMajorSeparator(int, String, int)
and findSegmentEnd(int, String, int)
.protected SegmentSequence.StringArrayPool.SubstringAccessUnit stringArraySubstringAccessUnit
internArray(String, int, int, int)
.protected SegmentSequence.StringArrayPool.SegmentsAndSubsegmentAccessUnit stringArraySegmentsAndSubsegmentAccessUnit
internArray(int, String[], int, String, int, int, int)
.protected URI.URIPool.StringAccessUnit(URI.URIPool.StringAccessUnit.Queue queue, URI.URIPool pool)
protected java.lang.String[] internArray(java.lang.String segment, int offset, int count, int hashCode)
protected java.lang.String[] internArray(int hashCode, java.lang.String[] segments, int segmentCount, java.lang.String segment, int offset, int count, int segmentHashCode)
protected void setValue(java.lang.String value)
protected void setValue(java.lang.String value, int hashCode)
protected boolean matches(URI value)
Pool.AccessUnit
Object.equals(Object)
.matches
in class Pool.AccessUnit<URI>
public URI match()
Pool.AccessUnit
Pool.AccessUnit.values
that Pool.AccessUnit.matches(Object)
the value being accessed.
Returns null
if there is no such matching value.match
in class Pool.AccessUnit<URI>
public URI getInternalizedValue()
Pool.AccessUnit
getInternalizedValue
in class Pool.AccessUnit<URI>
protected URI parseIntoURI(java.lang.String uri)
protected int findMajorSeparator(int length, java.lang.String s, int i)
hash code
and setting the character
that terminated the scan.protected int findSegmentEnd(int length, java.lang.String s, int i)
hash code
and setting the character
that terminated the scan.public void reset(boolean isExclusive)
Pool.AccessUnit
#getValues()
and #getEntries()
and then reset the Pool.AccessUnit.valuesLength
to 0reset
in class URI.URIPool.URIPoolAccessUnitBase