Package org.silverpeas.kernel.bundle
Class PropertyValuesList
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<String>,Collection<String>,List<String>,RandomAccess,SequencedCollection<String>
Represents a list of values of a given property.
- Author:
- Yohann Chastagnier
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Method Summary
Modifier and TypeMethodDescriptionInteger[]Converts the list into an array ofInteger.Integer[]asIntegerArray(Integer defaultValue) Converts the list into an array ofInteger.Converts the list into a list ofInteger.asIntegerList(Integer defaultValue) Converts the list into a list ofInteger.String[]Converts the list into an array ofString.String[]asStringArray(String defaultValue) Converts the list into an array ofString.asStringList(String defaultValue) Converts the list into an list ofStringwith default value if necessary.static PropertyValuesListInitializes a list with the given string values if any.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
-
Method Details
-
with
Initializes a list with the given string values if any.- Parameters:
values- none, one or several string values.- Returns:
- the initialized list.
-
asStringArray
Converts the list into an array ofString.- Returns:
- the current list converted into
Stringarray. No treatment is performed about not defined values.
-
asStringArray
Converts the list into an array ofString.- Parameters:
defaultValue- the default value to register if one is not defined.- Returns:
- the current list converted into
Stringarray with default value applied on not defined values.
-
asStringList
Converts the list into an list ofStringwith default value if necessary.- Parameters:
defaultValue- the default value to register if one is not defined.- Returns:
- the current list converted into
Stringlist with default value applied on not defined values.
-
asIntegerArray
Converts the list into an array ofInteger.- Returns:
- the current list converted into
Integerarray with null value applied on not defined values. - Throws:
NumberFormatException- if the string does not contain a parsable integer.
-
asIntegerList
Converts the list into a list ofInteger.- Returns:
- the current list converted into
Integerlist with null value applied on not defined values. - Throws:
NumberFormatException- if the string does not contain a parsable integer.
-
asIntegerArray
Converts the list into an array ofInteger.- Parameters:
defaultValue- the default value to register if one is not defined.- Returns:
- the current list converted into
Integerarray with default value applied on not defined values. - Throws:
NumberFormatException- if the string does not contain a parsable integer.
-
asIntegerList
Converts the list into a list ofInteger.- Parameters:
defaultValue- the default value to register if one is not defined.- Returns:
- the current list converted into
Integerlist with default value applied on not defined values. - Throws:
NumberFormatException- if the string does not contain a parsable integer.
-