public class NlsString extends Object implements Comparable<NlsString>
character set and
SqlCollation. It is immutable.| Constructor and Description |
|---|
NlsString(String value,
String charsetName,
SqlCollation collation)
Creates a string in a specfied character set.
|
| Modifier and Type | Method and Description |
|---|---|
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(List<NlsString> args)
Concatenates some
NlsString objects. |
NlsString |
copy(String value)
Creates a copy of this
NlsString with different content but same
charset and collation. |
boolean |
equals(Object obj) |
Charset |
getCharset() |
String |
getCharsetName() |
SqlCollation |
getCollation() |
String |
getValue() |
int |
hashCode() |
NlsString |
rtrim()
Returns a string the same as this but with spaces trimmed from the
right.
|
String |
toString()
Returns the string quoted for SQL, for example
_ISO-8859-1'is it a
plane? no it''s superman!'. |
public NlsString(String value, String charsetName, SqlCollation collation)
value - String constant, must not be nullcharsetName - Name of the character set, may be nullcollation - Collation, may be nullIllegalCharsetNameException - If the given charset name is illegalUnsupportedCharsetException - If no support for the named charset
is available in this instance of the Java virtual machineRuntimeException - If the given value cannot be represented in the
given charsetpublic int compareTo(NlsString other)
compareTo in interface Comparable<NlsString>public String getCharsetName()
public Charset getCharset()
public SqlCollation getCollation()
public String getValue()
public NlsString rtrim()
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 clausepublic String toString()
_ISO-8859-1'is it a
plane? no it''s superman!'.public static NlsString concat(List<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 concatenatedCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.