public class StringCache extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static boolean | OBJECT_CACHE | 
| static int | OBJECT_CACHE_SIZE | 
| Modifier and Type | Method and Description | 
|---|---|
| static String | cache(String s)Get the string from the cache if possible. | 
| static void | clearCache()Clear the cache. | 
| static String | fromCacheOrNew(String s)Get a string from the cache, and if no such string has been found, create
 a new one with only this content. | 
public static final boolean OBJECT_CACHE
public static final int OBJECT_CACHE_SIZE
public static String cache(String s)
s - the original stringpublic static String fromCacheOrNew(String s)
s - the stringpublic static void clearCache()
Copyright © 2004–2022 The Apache Software Foundation. All rights reserved.