public final class StringPool extends Object
String.intern(), but uses a bit more memory.| Modifier and Type | Method and Description |
|---|---|
static StringPool |
getPool() |
static StringPool |
getSynchronizedPool() |
String |
pool(String s)
Pools the given string and returns a reference to an existing string (if
exists).
|
public final String pool(String s)
s - the stringpublic static StringPool getPool()
HashMap.public static StringPool getSynchronizedPool()
ConcurrentHashMap.Copyright © 2016. All rights reserved.