|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectAbstractInternationalString
SimpleInternationalString
public class SimpleInternationalString
A simple international string consisting of a single string for all locales. For such a particular case, this implementation is the more effective than other implementations provided in this package.
Constructor Summary | |
---|---|
SimpleInternationalString(String message)
Creates a new instance of international string. |
Method Summary | |
---|---|
boolean |
equals(Object object)
Compares this international string with the specified object for equality. |
int |
hashCode()
Returns a hash code value for this international text. |
String |
toString(Locale locale)
Returns the same string for all locales. |
static AbstractInternationalString |
wrap(CharSequence string)
If the specified string is null or an instance of AbstractInternationalString , returns it unchanged. |
Methods inherited from class AbstractInternationalString |
---|
charAt, compareTo, length, subSequence, toString |
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SimpleInternationalString(String message)
message
- The string for all locales.Method Detail |
---|
public static AbstractInternationalString wrap(CharSequence string)
AbstractInternationalString
, returns it unchanged.
Otherwise, wraps the string value in a SimpleInternationalString
.
string
- The string to wrap.
public String toString(Locale locale)
toString
in interface InternationalString
toString
in class AbstractInternationalString
locale
- The desired locale for the string to be returned, or null
for a string in the implementation default locale.
public boolean equals(Object object)
equals
in class Object
object
- The object to compare with this international string.
true
if the given object is equals to this string.public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |