|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAbstractInternationalString
public abstract class AbstractInternationalString
A string that has been internationalized into several
locales. This class is used as a replacement for the
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 Summary | |
|---|---|
AbstractInternationalString()
Constructs an international string. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractInternationalString()
| Method Detail |
|---|
public int length()
toString().
length in interface CharSequence
public char charAt(int index)
throws IndexOutOfBoundsException
toString().
charAt in interface CharSequenceindex - 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 CharSequencestart - 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 InternationalStringlocale - 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 CharSequencetoString in interface InternationalStringtoString in class Objectpublic int compareTo(InternationalString object)
toString().
compareTo in interface Comparable<InternationalString>object - The string to compare with this string.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||