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 ofLocalisedString
s. 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[]
ls
The 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 LocalisedString
loc(LocalisedString[] ls)
Creates a new collection ofLocalisedString
.static LocalisedString
loc(Collection<? extends LocalisedString> ls)
Creates a new collection ofLocalisedString
.String
toLocalisedString(LocalisationFactory locFac, Locale loc)
Gets the localised representation of the implementing object.String
toString()
-
-
-
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
LocalisedString
representing a collection ofLocalisedString
s.
-
loc
public static LocalisedString loc(Collection<? extends LocalisedString> ls)
Creates a new collection ofLocalisedString
.- Parameters:
ls
- The strings needing localisation.- Returns:
- A
LocalisedString
representing a collection ofLocalisedString
s.
-
toLocalisedString
public String toLocalisedString(LocalisationFactory locFac, Locale loc)
Description copied from interface:LocalisedString
Gets the localised representation of the implementing object. The localisation should be for the designated locale, model objects beingLocalised
should use the designated localisation factory for automatic localisation.- Specified by:
toLocalisedString
in interfaceLocalisedString
- Parameters:
locFac
- The localisation factory to be used byLocalised
model objects. If this isnull
, do not localise the usedLocalised
attributes.loc
- The locale for which to get the localised string. If this isnull
, treat it likeLocale.ROOT
has been requested.- Returns:
- The localised (string) representation of the implementing object for the designated locale using the designated localisation factory if appropriate.
-
-