Class CharDeduplication
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.util.CharDeduplication
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intnumber of entries to linear search affects performance but decreases collisions - does not affect memorystatic final intsize of hash table, does not affect performance due to hashing but affects memory -
Method Summary
Modifier and TypeMethodDescriptionstatic CharDeduplicationstatic char[]intern(char[] source) voidreset()Deprecated.char[]sharedCopyOfRange(char[] source, int from, int to) like Arrays.copyOfRange(source, from, to) but returns a cached instance of the former result if available
-
Field Details
-
TABLE_SIZE
public static final int TABLE_SIZEsize of hash table, does not affect performance due to hashing but affects memory- See Also:
-
SEARCH_SIZE
public static final int SEARCH_SIZEnumber of entries to linear search affects performance but decreases collisions - does not affect memory- See Also:
-
-
Method Details
-
getThreadLocalInstance
- Returns:
- an instance that is *not* thread safe. To be used in a single thread only.
-
reset
-
intern
public static char[] intern(char[] source)
-