Package com.ctc.wstx.util
Class InternCache
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,String>
Singleton class that implements "fast intern" functionality, essentially
adding a layer that caches Strings that have been previously intern()ed,
but that probably shouldn't be added to symbol tables.
This is usually used by improving intern()ing of things like namespace
URIs.
Note: that this class extends LinkedHashMap is an implementation
detail -- no code should ever directly call Map methods.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Method Summary
Modifier and TypeMethodDescriptionstatic InternCacheprotected booleanremoveEldestEntry(Map.Entry<String, String> eldest) Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Method Details
-
getInstance
-
intern
-
removeEldestEntry
- Overrides:
removeEldestEntryin classLinkedHashMap<String,String>
-