Package org.eclipse.emf.common.util
Class URI.URIPool.FileAccessUnit
java.lang.Object
org.eclipse.emf.common.util.Pool.AccessUnit<URI>
org.eclipse.emf.common.util.URI.URIPool.URIPoolAccessUnitBase
org.eclipse.emf.common.util.URI.URIPool.FileAccessUnit
- Enclosing class:
- URI.URIPool
An Access unit for file URI string-based access.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected char[]The buffer for absolute file paths.protected StringThe final encoded path.protected static final StringThe base URI for file scheme URIs.protected static final intThe hash code of the base URI for file scheme URIs.protected static final intThe length of the base URI for file scheme URIs.protected booleanWhether the file path represents an absolute file.protected booleanWhether the path itself is absolute.protected StringThe file path being accessed.protected char[]The buffer for relative file paths.protected int[]The boundaries of the segments in the path.protected intThe number of segments in the path.protected int[]The hash codes of the segments in the path.protected String[]The segments of the path.protected intThe number of segments populated with strings during intern that need to be nulled during reset.Fields inherited from class org.eclipse.emf.common.util.URI.URIPool.URIPoolAccessUnitBase
charactersAccessUnit, stringAccessUnit, stringArraySegmentsAndSegmentCountAccessUnit, stringPoolEntry, substringAccessUnitFields inherited from class org.eclipse.emf.common.util.Pool.AccessUnit
createdEntry, entries, hashCode, matchingIndex, next, queue, values, valuesLength -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance managed by the given queue. -
Method Summary
Modifier and TypeMethodDescriptionGets 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 voidCaches the parameter and computes the hash code.Methods inherited from class org.eclipse.emf.common.util.URI.URIPool.URIPoolAccessUnitBase
getValue, intern, intern, intern, intern, intern, intern, internArray, setArbitraryValue, setValueMethods inherited from class org.eclipse.emf.common.util.Pool.AccessUnit
add, getEntry, match, rematches
-
Field Details
-
FILE_BASE
The base URI for file scheme URIs.- See Also:
-
FILE_BASE_LENGTH
protected static final int FILE_BASE_LENGTHThe length of the base URI for file scheme URIs. -
FILE_BASE_HASH_CODE
protected static final int FILE_BASE_HASH_CODEThe hash code of the base URI for file scheme URIs. -
path
The file path being accessed. -
absoluteCharacters
protected char[] absoluteCharactersThe buffer for absolute file paths. -
relativeCharacters
protected char[] relativeCharactersThe buffer for relative file paths. -
segments
The segments of the path. -
segmentCount
protected int segmentCountThe number of segments in the path. -
usedSegmentCount
protected int usedSegmentCountThe number of segments populated with strings during intern that need to be nulled during reset. -
segmentBoundaries
protected int[] segmentBoundariesThe boundaries of the segments in the path. -
segmentHashCodes
protected int[] segmentHashCodesThe hash codes of the segments in the path. -
encodedPath
The final encoded path. -
isAbsoluteFile
protected boolean isAbsoluteFileWhether the file path represents an absolute file. -
isAbsolutePath
protected boolean isAbsolutePathWhether the path itself is absolute.
-
-
Constructor Details
-
FileAccessUnit
Creates an instance managed by the given queue.
-
-
Method Details
-
setValue
Caches the parameter 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 classPool.AccessUnit<URI>
-
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<URI>
-
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 classURI.URIPool.URIPoolAccessUnitBase
-