public abstract class AbstractInternationalString extends Object implements InternationalString
String
type whenever an attribute
needs to be internationalization capable. The default value (as returned by toString()
and other CharSequence
methods} is the string in the current system default.
The natural ordering is defined by the string in default locale, as returned by toString()
. This string also defines
the character sequence.
Constructor and Description |
---|
AbstractInternationalString()
Constructs an international string.
|
Modifier and Type | Method and Description |
---|---|
char |
charAt(int index)
Returns the character of the string in the default locale at
the specified index.
|
int |
compareTo(InternationalString object)
Compares this string with the specified object for order.
|
int |
length()
Returns the length of the string in the default locale.
|
CharSequence |
subSequence(int start,
int end)
Returns a subsequence of the string in the default locale.
|
String |
toString()
Returns this string in the default locale.
|
abstract String |
toString(Locale locale)
Returns this string in the given locale.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
chars, codePoints
public AbstractInternationalString()
public int length()
toString()
.length
in interface CharSequence
public char charAt(int index) throws IndexOutOfBoundsException
toString()
.charAt
in interface CharSequence
index
- The index of the character.IndexOutOfBoundsException
- if the specified index is out of bounds.public CharSequence subSequence(int start, int end)
String
object starting with the character value at the specified
index and ending with the character value at index end - 1
.subSequence
in interface CharSequence
start
- The start index, inclusive.end
- The end index, exclusive.IndexOutOfBoundsException
- if start
or end
is out of range.public abstract String toString(Locale locale)
toString
in interface InternationalString
locale
- The desired locale for the string to be returned, or null
for a string
in the implementation default locale.public String toString()
toString(Locale.getDefault())
. All
methods from CharSequence
operate on this string. This string is also used as the
criterion for natural ordering.toString
in interface CharSequence
toString
in interface InternationalString
toString
in class Object
public int compareTo(InternationalString object)
toString()
.compareTo
in interface Comparable<InternationalString>
object
- The string to compare with this string.Copyright © 1996–2019 Geotools. All rights reserved.