public class NonLocalisedString extends java.lang.Object implements LocalisedString
LocalisedString.| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Object |
s
The object representation (usually a string) not needing localisation.
|
| Constructor and Description |
|---|
NonLocalisedString(java.lang.Object s)
Creates a new
LocalisedString which does not need localisation. |
| Modifier and Type | Method and Description |
|---|---|
static LocalisedString |
nonLoc(boolean b)
Creates a
LocalisedString for the designated boolean. |
static LocalisedString |
nonLoc(byte b)
Creates a
LocalisedString for the designated byte. |
static LocalisedString |
nonLoc(char c)
Creates a
LocalisedString for the designated char. |
static LocalisedString |
nonLoc(double d)
Creates a
LocalisedString for the designated double. |
static LocalisedString |
nonLoc(float f)
Creates a
LocalisedString for the designated float. |
static LocalisedString |
nonLoc(int i)
Creates a
LocalisedString for the designated int. |
static LocalisedString |
nonLoc(long l)
Creates a
LocalisedString for the designated long. |
static LocalisedString |
nonLoc(java.lang.Object o)
Creates a
LocalisedString for the designated object. |
static LocalisedString |
nonLoc(short s)
Creates a
LocalisedString for the designated short. |
static LocalisedString |
nonLoc(java.lang.String s)
Creates a
LocalisedString for the designated simple string. |
java.lang.Object |
toLocalisedString(LocalisationFactory locFac,
java.util.Locale loc)
Gets the localised representation of the implementing object.
|
java.lang.String |
toString() |
protected final java.lang.Object s
public NonLocalisedString(java.lang.Object s)
LocalisedString which does not need localisation.s - The string not needing localisation.public static LocalisedString nonLoc(java.lang.String s)
LocalisedString for the designated simple string.s - The string not needing localisation.LocalisedString for the designated simple string.public static LocalisedString nonLoc(long l)
LocalisedString for the designated long.l - The long not needing localisation.LocalisedString for the designated long.public static LocalisedString nonLoc(int i)
LocalisedString for the designated int.i - The int not needing localisation.LocalisedString for the designated int.public static LocalisedString nonLoc(short s)
LocalisedString for the designated short.s - The short not needing localisation.LocalisedString for the designated short.public static LocalisedString nonLoc(char c)
LocalisedString for the designated char.c - The char not needing localisation.LocalisedString for the designated char.public static LocalisedString nonLoc(byte b)
LocalisedString for the designated byte.b - The byte not needing localisation.LocalisedString for the designated byte.public static LocalisedString nonLoc(boolean b)
LocalisedString for the designated boolean.b - The boolean not needing localisation.LocalisedString for the designated boolean.public static LocalisedString nonLoc(float f)
LocalisedString for the designated float.f - The float not needing localisation.LocalisedString for the designated float.public static LocalisedString nonLoc(double d)
LocalisedString for the designated double.d - The double not needing localisation.LocalisedString for the designated double.public static LocalisedString nonLoc(java.lang.Object o)
LocalisedString for the designated object. Depending on the class of the
object, some string manipulation or conversion may take place. For instance, usually
Object.toString() will be used, but depending on the class of the object, something
different may be used, e. g. Arrays.toString(Object[]).o - The object for which to get a simple string representation not needing localisation.LocalisedString with a simple string representation for the designated
object.public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object toLocalisedString(LocalisationFactory locFac, java.util.Locale loc)
LocalisedStringLocalised should use the designated
localisation factory for automatic localisation.toLocalisedString in interface LocalisedStringlocFac - The localisation factory to be used by Localised model objects. If this
is null, do not localise the used Localised attributes.loc - The locale for which to get the localised string. If this is null,
treat it like Locale.ROOT has been requested.