@InterfaceAudience.Public @InterfaceStability.Stable public class StringInterner extends Object
Constructor and Description |
---|
StringInterner() |
Modifier and Type | Method and Description |
---|---|
static String |
strongIntern(String sample)
Interns and returns a reference to the representative instance
for any of a collection of string instances that are equal to each other.
|
static String |
weakIntern(String sample)
Interns and returns a reference to the representative instance
for any of a collection of string instances that are equal to each other.
|
public StringInterner()
public static String strongIntern(String sample)
sample
- string instance to be internedpublic static String weakIntern(String sample)
sample
- string instance to be internedCopyright © 2017 Apache Software Foundation. All Rights Reserved.