com.ctc.wstx.util
Class InternCache

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by com.ctc.wstx.util.InternCache
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map

public final class InternCache
extends java.util.HashMap

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 HashMap is an implementation detail -- no code should ever directly call Map methods.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Method Summary
static InternCache getInstance()
           
 java.lang.String intern(java.lang.String input)
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Method Detail

getInstance

public static InternCache getInstance()

intern

public java.lang.String intern(java.lang.String input)