org.eclipse.internal.xtend.util
Class StringCache

java.lang.Object
  extended by org.eclipse.internal.xtend.util.StringCache

public class StringCache
extends java.lang.Object

A cache for Strings which allows that its values might by garbage collected.


Constructor Summary
StringCache()
           
 
Method Summary
static java.lang.String get(java.lang.String s)
           
static java.lang.String getx(java.lang.String s, boolean createNew)
          Retrieves a String value from the cache.
static void putx(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringCache

public StringCache()
Method Detail

getx

public static java.lang.String getx(java.lang.String s,
                                    boolean createNew)
Retrieves a String value from the cache.

Parameters:
s - A string
createNew - If true the string will be put into the cache if it was not cached before.
Returns:
The cached instance, or s when it was not cached before.

get

public static java.lang.String get(java.lang.String s)

putx

public static void putx(java.lang.String s)