Class NonLocalisedString
java.lang.Object
de.aristaflow.adept2.model.common.i18n.NonLocalisedString
- All Implemented Interfaces:
LocalisedString
Implementation to provide constant object (usually string)representations which do not need to be
localised as
LocalisedString.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newLocalisedStringwhich does not need localisation. -
Method Summary
Modifier and TypeMethodDescriptionstatic LocalisedStringnonLoc(boolean b) Creates aLocalisedStringfor the designatedboolean.static LocalisedStringnonLoc(byte b) Creates aLocalisedStringfor the designatedbyte.static LocalisedStringnonLoc(char c) Creates aLocalisedStringfor the designatedchar.static LocalisedStringnonLoc(double d) Creates aLocalisedStringfor the designateddouble.static LocalisedStringnonLoc(float f) Creates aLocalisedStringfor the designatedfloat.static LocalisedStringnonLoc(int i) Creates aLocalisedStringfor the designatedint.static LocalisedStringnonLoc(long l) Creates aLocalisedStringfor the designatedlong.static LocalisedStringnonLoc(short s) Creates aLocalisedStringfor the designatedshort.static LocalisedStringCreates aLocalisedStringfor the designated object.static LocalisedStringCreates aLocalisedStringfor the designated simple string.toLocalisedString(LocalisationFactory locFac, Locale loc) Gets the localised representation of the implementing object.toString()
-
Field Details
-
s
The object representation (usually a string) not needing localisation.
-
-
Constructor Details
-
NonLocalisedString
Creates a newLocalisedStringwhich does not need localisation.- Parameters:
s- The string not needing localisation.
-
-
Method Details
-
nonLoc
Creates aLocalisedStringfor the designated simple string.- Parameters:
s- The string not needing localisation.- Returns:
- A
LocalisedStringfor the designated simple string.
-
nonLoc
Creates aLocalisedStringfor the designatedlong.- Parameters:
l- Thelongnot needing localisation.- Returns:
- A
LocalisedStringfor the designatedlong.
-
nonLoc
Creates aLocalisedStringfor the designatedint.- Parameters:
i- Theintnot needing localisation.- Returns:
- A
LocalisedStringfor the designatedint.
-
nonLoc
Creates aLocalisedStringfor the designatedshort.- Parameters:
s- Theshortnot needing localisation.- Returns:
- A
LocalisedStringfor the designatedshort.
-
nonLoc
Creates aLocalisedStringfor the designatedchar.- Parameters:
c- Thecharnot needing localisation.- Returns:
- A
LocalisedStringfor the designatedchar.
-
nonLoc
Creates aLocalisedStringfor the designatedbyte.- Parameters:
b- Thebytenot needing localisation.- Returns:
- A
LocalisedStringfor the designatedbyte.
-
nonLoc
Creates aLocalisedStringfor the designatedboolean.- Parameters:
b- Thebooleannot needing localisation.- Returns:
- A
LocalisedStringfor the designatedboolean.
-
nonLoc
Creates aLocalisedStringfor the designatedfloat.- Parameters:
f- Thefloatnot needing localisation.- Returns:
- A
LocalisedStringfor the designatedfloat.
-
nonLoc
Creates aLocalisedStringfor the designateddouble.- Parameters:
d- Thedoublenot needing localisation.- Returns:
- A
LocalisedStringfor the designateddouble.
-
nonLoc
Creates aLocalisedStringfor the designated object. Depending on the class of the object, some string manipulation or conversion may take place. For instance, usuallyObject.toString()will be used, but depending on the class of the object, something different may be used, e. g.Arrays.toString(Object[]).- Parameters:
o- The object for which to get a simple string representation not needing localisation.- Returns:
- A
LocalisedStringwith a simple string representation for the designated object.
-
toString
-
toLocalisedString
Description copied from interface:LocalisedStringGets the localised representation of the implementing object. The localisation should be for the designated locale, model objects beingLocalisedshould use the designated localisation factory for automatic localisation.- Specified by:
toLocalisedStringin interfaceLocalisedString- Parameters:
locFac- The localisation factory to be used byLocalisedmodel objects. If this isnull, do not localise the usedLocalisedattributes.loc- The locale for which to get the localised string. If this isnull, treat it likeLocale.ROOThas been requested.- Returns:
- The localised (string) representation of the implementing object for the designated locale using the designated localisation factory if appropriate.
-