Class I18NValue<V,L extends LocalizedValue<V>>

java.lang.Object
java.util.AbstractCollection<L>
java.util.AbstractList<L>
java.util.ArrayList<L>
org.exoplatform.portal.config.model.I18NValue<V,L>
All Implemented Interfaces:
Serializable, Cloneable, Iterable<L>, Collection<L>, List<L>, RandomAccess, SequencedCollection<L>
Direct Known Subclasses:
I18NString

public class I18NValue<V,L extends LocalizedValue<V>> extends ArrayList<L>
See Also:
  • Constructor Details

    • I18NValue

      public I18NValue()
    • I18NValue

      public I18NValue(Collection<? extends L> c)
    • I18NValue

      public I18NValue(L... values)
  • Method Details

    • create

      public static I18NValue create()
    • isSimple

      public boolean isSimple()
      Returns true when the collection contains exactly one localized value and this value does not have a locale associated with it.
      Returns:
      true if the value is simple
    • isExtended

      public boolean isExtended()
      Returns true if the collection extended which means that it is not empty and it is not simple.
      Returns:
      true if the value is extended
    • getSimple

      public V getSimple()
      Returns the simple value or null if the collection is empty or extended.
      Returns:
      the simple value
    • getExtended

      public Map<Locale,V> getExtended(Locale defaultLocale)
      Returns a map of the values or null if the collection is empty. The defaultLocale argument is used as a key when an unqualified value is found, otherwise it is not used
      Parameters:
      defaultLocale - the default locale
      Returns:
      the extended value map