|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eigenbase.util.NlsString
public class NlsString
A string, optionally with character set and SqlCollation. It is immutable.
| Field Summary | |
|---|---|
private Charset |
charset
|
private String |
charsetName
|
private SqlCollation |
collation
|
private String |
value
|
| Constructor Summary | |
|---|---|
NlsString(String value,
String charsetName,
SqlCollation collation)
Creates a string in a specfied character set. |
|
| Method Summary | |
|---|---|
String |
asSql(boolean prefix,
boolean suffix)
Returns the string quoted for SQL, for example _ISO-8859-1'is it a
plane? no it''s superman!'. |
Object |
clone()
|
int |
compareTo(NlsString other)
|
static NlsString |
concat(NlsString[] args)
Concatenates some NlsString objects. |
boolean |
equals(Object obj)
|
Charset |
getCharset()
|
String |
getCharsetName()
|
SqlCollation |
getCollation()
|
String |
getValue()
|
int |
hashCode()
|
String |
toString()
Returns the string quoted for SQL, for example _ISO-8859-1'is it a
plane? no it''s superman!'. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final String charsetName
private final String value
private final Charset charset
private final SqlCollation collation
| Constructor Detail |
|---|
public NlsString(String value,
String charsetName,
SqlCollation collation)
throws IllegalCharsetNameException,
UnsupportedCharsetException
value - String constant, must not be nullcharsetName - Name of the character set, may be nullcollation - Collation, may be null
IllegalCharsetNameException - If the given charset name is illegal
UnsupportedCharsetException - If no support for the named charset
is available in this instance of the Java virtual machine
RuntimeException - If the given value cannot be represented in the
given charset| Method Detail |
|---|
public Object clone()
clone in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int compareTo(NlsString other)
compareTo in interface Comparable<NlsString>public String getCharsetName()
public Charset getCharset()
public SqlCollation getCollation()
public String getValue()
public String asSql(boolean prefix,
boolean suffix)
_ISO-8859-1'is it a
plane? no it''s superman!'.
prefix - if true, prefix the character set namesuffix - if true, suffix the collation clause
public String toString()
_ISO-8859-1'is it a
plane? no it''s superman!'.
toString in class Objectpublic static NlsString concat(NlsString[] args)
NlsString objects. The result has the charset
and collation of the first element. The other elements must have matching
(or null) charset and collation. Concatenates all at once, not pairwise,
to avoid string copies.
args - array of NlsString to be concatenated
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||