Class LocalisedStringCollection
- java.lang.Object
-
- de.aristaflow.adept2.model.common.i18n.LocalisedStringCollection
-
- All Implemented Interfaces:
LocalisedString
public class LocalisedStringCollection extends Object implements LocalisedString
Implementation to provide a collection ofLocalisedStrings. These are localised one by one but the localisation are used as one resulting localised string, similar to an array of strings.
-
-
Field Summary
Fields Modifier and Type Field Description protected LocalisedString[]lsThe strings needing localisation.
-
Constructor Summary
Constructors Constructor Description LocalisedStringCollection(LocalisedString[] ls)Creates a new collection ofLocalisedString.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LocalisedStringloc(LocalisedString[] ls)Creates a new collection ofLocalisedString.static LocalisedStringloc(Collection<? extends LocalisedString> ls)Creates a new collection ofLocalisedString.StringtoLocalisedString(LocalisationFactory locFac, Locale loc)Gets the localised representation of the implementing object.StringtoString()
-
-
-
Field Detail
-
ls
protected final LocalisedString[] ls
The strings needing localisation.
-
-
Constructor Detail
-
LocalisedStringCollection
public LocalisedStringCollection(LocalisedString[] ls)
Creates a new collection ofLocalisedString.- Parameters:
ls- The strings needing localisation.
-
-
Method Detail
-
loc
public static LocalisedString loc(LocalisedString[] ls)
Creates a new collection ofLocalisedString.- Parameters:
ls- The strings needing localisation.- Returns:
- A
LocalisedStringrepresenting a collection ofLocalisedStrings.
-
loc
public static LocalisedString loc(Collection<? extends LocalisedString> ls)
Creates a new collection ofLocalisedString.- Parameters:
ls- The strings needing localisation.- Returns:
- A
LocalisedStringrepresenting a collection ofLocalisedStrings.
-
toLocalisedString
public String toLocalisedString(LocalisationFactory locFac, Locale loc)
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.
-
-