public final class StringIntern
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static StringIntern |
EMPTY
Empty string as a StringIntern
|
static java.lang.String |
NO
"N" indexed value
|
static StringIntern |
NULL
null as a StringIntern
|
static java.lang.String |
YES
"Y" indexed value
|
static StringIntern |
ZERO
"0" as a StringIntern
|
Modifier and Type | Method and Description |
---|---|
static void |
clear()
Clear internal Strings
|
int |
compareTo(java.lang.Object a)
Same as String.compareTo
|
boolean |
equals(java.lang.Object a) |
static StringIntern |
get(java.lang.String value)
Get the internalized String
|
java.lang.String |
getValue()
Returns indexed value, same as toString
|
static java.lang.String |
getValue(java.lang.String value)
Returns the String singleton from any String
|
static java.lang.String |
getValue(StringIntern intern)
Get the value of a string singleton
|
int |
hashCode() |
int |
indexOf(char c)
Same as String.indexOf
|
int |
indexOf(java.lang.String text)
Same as String.indexOf
|
int |
length()
Same as String.length
|
void |
setValue(java.lang.String value)
Set the value
|
boolean |
startsWith(java.lang.String prefix)
Same as String.startsWith
|
java.lang.String |
toString()
Returns indexed value, same as getValue
|
public static final StringIntern NULL
public static final StringIntern EMPTY
public static final StringIntern ZERO
public static final java.lang.String YES
public static final java.lang.String NO
public java.lang.String getValue()
Returns indexed value, same as toString
public void setValue(java.lang.String value)
Set the value
public java.lang.String toString()
Returns indexed value, same as getValue
toString
in class java.lang.Object
public boolean equals(java.lang.Object a)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(java.lang.Object a)
Same as String.compareTo
public boolean startsWith(java.lang.String prefix)
Same as String.startsWith
public int indexOf(java.lang.String text)
Same as String.indexOf
public int indexOf(char c)
Same as String.indexOf
public int length()
Same as String.length
public static StringIntern get(java.lang.String value)
Get the internalized String
value
- Value to indexpublic static void clear()
Clear internal Strings
public static java.lang.String getValue(java.lang.String value)
Returns the String singleton from any String
value
- Value to indexpublic static java.lang.String getValue(StringIntern intern)
Get the value of a string singleton
intern
- Internalized stringCopyright (c)2006-2014 Simplicite Software. All Rights Reserved.