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 of LocalisedStrings. These are localised one by one but the localisation are used as one resulting localised string, similar to an array of strings.
  • Field Details

    • ls

      protected final LocalisedString[] ls
      The strings needing localisation.
  • Constructor Details

    • LocalisedStringCollection

      public LocalisedStringCollection(LocalisedString[] ls)
      Creates a new collection of LocalisedString.
      Parameters:
      ls - The strings needing localisation.
  • Method Details

    • loc

      public static LocalisedString loc(LocalisedString[] ls)
      Creates a new collection of LocalisedString.
      Parameters:
      ls - The strings needing localisation.
      Returns:
      A LocalisedString representing a collection of LocalisedStrings.
    • loc

      public static LocalisedString loc(Collection<? extends LocalisedString> ls)
      Creates a new collection of LocalisedString.
      Parameters:
      ls - The strings needing localisation.
      Returns:
      A LocalisedString representing a collection of LocalisedStrings.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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 being Localised should use the designated localisation factory for automatic localisation.
      Specified by:
      toLocalisedString in interface LocalisedString
      Parameters:
      locFac - 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.
      Returns:
      The localised (string) representation of the implementing object for the designated locale using the designated localisation factory if appropriate.