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
- Author:
- Julien Viet
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic I18NValuecreate()getExtended(Locale defaultLocale) Returns a map of the values or null if the collection is empty.Returns the simple value or null if the collection is empty or extended.booleanReturns true if the collection extended which means that it is not empty and it is not simple.booleanisSimple()Returns true when the collection contains exactly one localized value and this value does not have a locale associated with it.Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll, reversed
-
Constructor Details
-
I18NValue
public I18NValue() -
I18NValue
-
I18NValue
-
-
Method Details
-
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
Returns the simple value or null if the collection is empty or extended.- Returns:
- the simple value
-
getExtended
Returns a map of the values or null if the collection is empty. ThedefaultLocaleargument 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
-