Package org.eclipse.emf.common.util
Class SegmentSequence.StringArrayPool
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
org.eclipse.emf.common.util.WeakInterningHashSet<E>
org.eclipse.emf.common.util.Pool<String[]>
org.eclipse.emf.common.util.SegmentSequence.StringArrayPool
- All Implemented Interfaces:
Serializable,Iterable<String[]>,Collection<String[]>,Set<String[]>,InterningSet<String[]>
- Enclosing class:
- SegmentSequence
A specialized pool for caching string arrays.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classA base class for all this pool's access units.protected static final classAn Access unit for accessing segments that may need copying or interning.protected static classAn access units for accessing segments and one additional segment.protected static classAn Access units for accessing a range of segments.protected static classAn access units for accessing the composition of two sequences of segments.protected static classAn access unit for accessing segments and a substring of one additional segment.protected static classAn access unit for single segment access.protected static classAn access units for accessing the composition of two subsequences.protected static classAn Access units for accessing a single segment that's a substring of a larger string.Nested classes/interfaces inherited from class org.eclipse.emf.common.util.Pool
Pool.AccessUnit<E>, Pool.ExternalRehasher<E>, Pool.ObjectAccessUnit<E>, Pool.PoolEntry<E>Nested classes/interfaces inherited from class org.eclipse.emf.common.util.WeakInterningHashSet
WeakInterningHashSet.Entry<E>, WeakInterningHashSet.SelfCleaningEntry<E> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SegmentSequence.StringArrayPool.SegmentsAccessUnit.QueueAccess units for accessing segments that may need copying or interning.Access units for accessing segments and one additional segment.Access units for accessing a range of segments.Access units for accessing the composition of two sequences of segments.Access units for accessing subsegments and a substring of one additional segment.protected final SegmentSequence.StringArrayPool.StringAccessUnit.QueueAccess units for single segment access.Access units for accessing the composition of two subsequences.protected final SegmentSequence.StringArrayPool.SubstringAccessUnit.QueueAccess units for accessing a single segment that's a substring of a larger string.Fields inherited from class org.eclipse.emf.common.util.Pool
accessCount, cleanupPeriod, primaryAccessUnits, readLock, readWriteLock, writeLockFields inherited from class org.eclipse.emf.common.util.WeakInterningHashSet
capacityIndex, containsNull, entries, externalQueue, internalQueue, modCount, NULL_ENTRY, PRIME_CAPACITIES, size, threshold -
Constructor Summary
ConstructorsConstructorDescriptionStringArrayPool(ReferenceQueue<Object> queue) Creates an instance managed by the given queue. -
Method Summary
Modifier and TypeMethodDescriptionprotected String[]asInstance(Object object) Checks whether the object is string array and casts it or returnnull</code.protected booleanReturns theArrays.equals(Object[], Object[])'s value for these two objects object.protected intReturns theArrays.hashCode(Object[])'s value for this object.protected String[]Intern segments that may need copying or interning.protected String[]intern(int hashCode, String[] segments, int segmentCount, String segment, int offset, int count, int segmentHashCode) Intern segments and a substring of one additional segment.protected String[]Intern a range of segments.protected String[]Intern a range of segments.protected String[]Intern the composition of two subsequences.protected String[]Intern segments and one additional segment.protected String[]intern(String[] segments, int segmentCount, String segment, int offset, int count, int segmentHashCode) Intern subsegments and a substring of one additional segment.protected String[]Intern the composition of two sequences of segments.protected String[]Intern a single segment.protected String[]Intern a single segment that's a substring of a larger string.Methods inherited from class org.eclipse.emf.common.util.Pool
access, add, addEntry, cleanup, clear, contains, containsAll, doCleanup, doIntern, ensureCapacity, equals, get, getEntry, getReadLock, getWriteLock, grow, hashCode, intern, iterator, newDefaultAccessUnits, newExternalEntry, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class org.eclipse.emf.common.util.WeakInterningHashSet
addEntry, dump, index, newEntries, newEntry, newInternalEntry, nullEntry, putEntry, removeEntry, removeEntry, sizeMethods inherited from class java.util.AbstractCollection
addAll, isEmptyMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
addAll, isEmpty, spliterator
-
Field Details
-
stringAccessUnits
Access units for single segment access. -
substringAccessUnits
Access units for accessing a single segment that's a substring of a larger string. -
segmentsAndSegmentAccessUnits
protected final SegmentSequence.StringArrayPool.SegmentsAndSegmentAccessUnit.Queue segmentsAndSegmentAccessUnitsAccess units for accessing segments and one additional segment. -
segmentsAndSubsegmentAccessUnits
protected final SegmentSequence.StringArrayPool.SegmentsAndSubsegmentAccessUnit.Queue segmentsAndSubsegmentAccessUnitsAccess units for accessing subsegments and a substring of one additional segment. -
segmentsAndSegmentCountAccessUnits
protected final SegmentSequence.StringArrayPool.SegmentsAndSegmentCountAccessUnit.Queue segmentsAndSegmentCountAccessUnitsAccess units for accessing a range of segments. -
segmentsAccessUnits
Access units for accessing segments that may need copying or interning. -
segmentsAndSegmentsAccessUnits
protected final SegmentSequence.StringArrayPool.SegmentsAndSegmentsAccessUnit.Queue segmentsAndSegmentsAccessUnitsAccess units for accessing the composition of two sequences of segments. -
subsegmentsAndSubsegmentsAccessUnits
protected final SegmentSequence.StringArrayPool.SubsegmentsAndSubsegmentsAccessUnit.Queue subsegmentsAndSubsegmentsAccessUnitsAccess units for accessing the composition of two subsequences.
-
-
Constructor Details
-
StringArrayPool
Creates an instance managed by the given queue.
-
-
Method Details
-
hashCode
Returns theArrays.hashCode(Object[])'s value for this object.- Overrides:
hashCodein classWeakInterningHashSet<String[]>
-
equals
Returns theArrays.equals(Object[], Object[])'s value for these two objects object.- Overrides:
equalsin classWeakInterningHashSet<String[]>
-
asInstance
Checks whether the object is string array and casts it or returnnull</code.- Overrides:
asInstancein classWeakInterningHashSet<String[]>
-
intern
Intern a single segment. -
intern
Intern a single segment that's a substring of a larger string. -
intern
protected String[] intern(String[] segments, int segmentCount, String segment, boolean needsInterning) Intern segments and one additional segment. -
intern
protected String[] intern(int hashCode, String[] segments, int segmentCount, String segment, int offset, int count, int segmentHashCode) Intern segments and a substring of one additional segment. -
intern
protected String[] intern(String[] segments, int segmentCount, String segment, int offset, int count, int segmentHashCode) Intern subsegments and a substring of one additional segment. -
intern
Intern a range of segments. -
intern
Intern a range of segments. -
intern
protected String[] intern(boolean needsCopying, boolean needsToIntern, String[] segments, int count) Intern segments that may need copying or interning. -
intern
Intern the composition of two sequences of segments. -
intern
protected String[] intern(String[] segments1, int offset1, int count1, String[] segments2, int offset2, int count2) Intern the composition of two subsequences.
-