@Immutable public final class CollectionHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
containsAnyNullElement(Iterable<?> aCont)
Check if the passed collection contains at least one
null
element. |
static boolean |
containsOnlyNullElements(Iterable<?> aCont)
Check if the passed collection contains only
null element. |
static List<?> |
getAsList(Object aObj)
Get the passed object as a
List object. |
static ECollectionBaseType |
getCollectionBaseTypeOfClass(Class<?> aClass) |
static ECollectionBaseType |
getCollectionBaseTypeOfObject(Object aObj) |
static <ELEMENTTYPE> |
getCombinedIterator(Iterator<? extends ELEMENTTYPE> aIter1,
Iterator<? extends ELEMENTTYPE> aIter2)
Get a merged iterator of both iterators.
|
static <KEY,VALUE> |
getCombinedMap(Map<KEY,VALUE> aMap1,
Map<KEY,VALUE> aMap2)
Create a map that contains the combination of the other 2 maps.
|
static <ELEMENTTYPE,COLLTYPE extends Collection<? super ELEMENTTYPE>> |
getConcatenatedInline(COLLTYPE aCont,
Collection<? extends ELEMENTTYPE> aElementsToAdd) |
static <ELEMENTTYPE,COLLTYPE extends Collection<? super ELEMENTTYPE>> |
getConcatenatedInline(COLLTYPE aCont,
ELEMENTTYPE... aElementsToAdd) |
static <ELEMENTTYPE> |
getConcatenatedList(Collection<? extends ELEMENTTYPE> aCollection1,
Collection<? extends ELEMENTTYPE> aCollection2) |
static <ELEMENTTYPE> |
getConcatenatedList(Collection<? extends ELEMENTTYPE> aCont1,
ELEMENTTYPE... aCont2) |
static <ELEMENTTYPE> |
getConcatenatedList(ELEMENTTYPE[] aCont1,
Collection<? extends ELEMENTTYPE> aCont2) |
static <ELEMENTTYPE> |
getConcatenatedSet(Collection<? extends ELEMENTTYPE> aCont1,
Collection<? extends ELEMENTTYPE> aCont2) |
static <ELEMENTTYPE> |
getConcatenatedSet(Collection<? extends ELEMENTTYPE> aCont1,
ELEMENTTYPE... aCont2) |
static <ELEMENTTYPE> |
getConcatenatedSet(ELEMENTTYPE[] aCont1,
Collection<? extends ELEMENTTYPE> aCont2) |
static <ELEMENTTYPE> |
getDifference(Collection<? extends ELEMENTTYPE> aCollection1,
Collection<? extends ELEMENTTYPE> aCollection2)
Get all elements that are only contained in the first contained, and not in
the second.
|
static <ELEMENTTYPE> |
getEmptyEnumeration()
Create an empty enumeration.
|
static <ELEMENTTYPE> |
getEmptyIterator()
Create an empty iterator.
|
static <ELEMENTTYPE> |
getEnumeration(ELEMENTTYPE... aArray)
Get an
Enumeration object based on the passed array. |
static <ELEMENTTYPE> |
getEnumeration(Iterable<ELEMENTTYPE> aCont)
Get an
Enumeration object based on a Collection object. |
static <ELEMENTTYPE> |
getEnumeration(Iterator<ELEMENTTYPE> aIter)
Get an Enumeration object based on an Iterator object.
|
static <KEYTYPE,VALUETYPE> |
getEnumeration(Map<KEYTYPE,VALUETYPE> aMap)
Get an Enumeration object based on a Map object.
|
static <KEY,VALUE> |
getFilteredMap(Map<KEY,VALUE> aValues,
Collection<KEY> aKeys)
Get a map consisting only of a set of specified keys.
|
static <ELEMENTTYPE> |
getFirstElement(Collection<ELEMENTTYPE> aCollection)
Get the first element of the passed collection.
|
static <ELEMENTTYPE> |
getFirstElement(Iterable<ELEMENTTYPE> aIterable)
Get the first element of the passed iterable.
|
static <ELEMENTTYPE> |
getFirstElement(List<ELEMENTTYPE> aList)
Get the first element of the passed list.
|
static <KEYTYPE,VALUETYPE> |
getFirstElement(Map<KEYTYPE,VALUETYPE> aMap)
Get the first element of the passed map.
|
static <ELEMENTTYPE> |
getFirstElement(SortedSet<ELEMENTTYPE> aSortedSet)
Get the first element of the passed sorted set.
|
static <KEYTYPE,VALUETYPE> |
getFirstKey(Map<KEYTYPE,VALUETYPE> aMap)
Get the first key of the passed map.
|
static <KEYTYPE,VALUETYPE> |
getFirstKey(SortedMap<KEYTYPE,VALUETYPE> aSortedMap)
Get the first key of the passed sorted map.
|
static <KEYTYPE,VALUETYPE> |
getFirstValue(Map<KEYTYPE,VALUETYPE> aMap)
Get the first value of the passed map.
|
static <KEYTYPE,VALUETYPE> |
getFirstValue(SortedMap<KEYTYPE,VALUETYPE> aSortedMap)
Get the first value of the passed map.
|
static <ELEMENTTYPE> |
getIntersected(Collection<? extends ELEMENTTYPE> aCollection1,
Collection<? extends ELEMENTTYPE> aCollection2)
Get all elements that are contained in the first AND in the second
container.
|
static <ELEMENTTYPE> |
getIterator(ELEMENTTYPE... aArray) |
static <ELEMENTTYPE> |
getIterator(Enumeration<? extends ELEMENTTYPE> aEnum) |
static <ELEMENTTYPE> |
getIterator(Iterable<ELEMENTTYPE> aCont) |
static <ELEMENTTYPE> |
getIterator(Iterator<ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
getLastElement(Collection<ELEMENTTYPE> aCollection) |
static <ELEMENTTYPE> |
getLastElement(Iterable<ELEMENTTYPE> aIterable) |
static <ELEMENTTYPE> |
getLastElement(List<ELEMENTTYPE> aList) |
static <ELEMENTTYPE> |
getLastElement(SortedSet<ELEMENTTYPE> aSortedSet) |
static <KEYTYPE,VALUETYPE> |
getLastKey(SortedMap<KEYTYPE,VALUETYPE> aSortedMap)
Get the last key of the passed sorted map.
|
static <KEYTYPE,VALUETYPE> |
getLastValue(SortedMap<KEYTYPE,VALUETYPE> aSortedMap)
Get the last value of the passed map.
|
static <ELEMENTTYPE> |
getNotNull(List<? extends ELEMENTTYPE> aList) |
static <KEYTYPE,VALUETYPE> |
getNotNull(Map<? extends KEYTYPE,? extends VALUETYPE> aMap) |
static <ELEMENTTYPE> |
getNotNull(Set<? extends ELEMENTTYPE> aSet) |
static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> |
getNotNull(SortedMap<? extends KEYTYPE,? extends VALUETYPE> aSortedMap) |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
getNotNull(SortedSet<? extends ELEMENTTYPE> aSortedSet) |
static <ELEMENTTYPE> |
getReverseInlineList(List<ELEMENTTYPE> aList) |
static <ELEMENTTYPE> |
getReverseIterator(List<? extends ELEMENTTYPE> aCont) |
static <ELEMENTTYPE> |
getReverseList(Collection<? extends ELEMENTTYPE> aCollection) |
static <KEYTYPE,VALUETYPE> |
getReverseLookup(IMultiMapSetBased<KEYTYPE,VALUETYPE> aMap)
Get a map where the lookup (1K..nV) has been reversed to (1V..nK)
|
static <KEYTYPE,VALUETYPE> |
getReverseLookupSet(IMultiMap<KEYTYPE,VALUETYPE,? extends Collection<VALUETYPE>> aMap)
Get a map where the lookup (1K..nV) has been reversed to (1V..nK)
|
static <ELEMENTTYPE> |
getSafe(List<ELEMENTTYPE> aList,
int nIndex)
Safe list element accessor method.
|
static <ELEMENTTYPE> |
getSafe(List<ELEMENTTYPE> aList,
int nIndex,
ELEMENTTYPE aDefault)
Safe list element accessor method.
|
static int |
getSize(Collection<?> aCollection)
Retrieve the size of the passed
Collection. |
static int |
getSize(Enumeration<?> aEnumeration)
Retrieve the size of the passed
Enumeration. |
static int |
getSize(IIterableIterator<?> aIterator)
Retrieve the size of the passed
Iterable. |
static int |
getSize(Iterable<?> aIterable)
Retrieve the size of the passed
Iterable. |
static int |
getSize(Iterator<?> aIterator)
Retrieve the size of the passed
Iterator. |
static int |
getSize(Map<?,?> aMap)
Retrieve the size of the passed
Map. |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
getSorted(Collection<? extends ELEMENTTYPE> aCont)
Convert the given collection object to a sorted list.
|
static <ELEMENTTYPE> |
getSorted(Collection<? extends ELEMENTTYPE> aCont,
Comparator<? super ELEMENTTYPE> aComparator)
Convert the given collection object to a sorted list.
|
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
getSorted(ELEMENTTYPE... aCont)
Convert the given iterable object to a sorted list.
|
static <ELEMENTTYPE> |
getSorted(ELEMENTTYPE[] aCont,
Comparator<? super ELEMENTTYPE> aComparator)
Convert the given iterable object to a sorted list.
|
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
getSorted(IIterableIterator<? extends ELEMENTTYPE> aIter)
Convert the given iterator to a sorted list.
|
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
getSorted(IIterableIterator<? extends ELEMENTTYPE> aIter,
Comparator<? super ELEMENTTYPE> aComparator)
Convert the given iterator to a sorted list.
|
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
getSorted(Iterable<? extends ELEMENTTYPE> aCont)
Convert the given iterable object to a sorted list.
|
static <ELEMENTTYPE> |
getSorted(Iterable<? extends ELEMENTTYPE> aCont,
Comparator<? super ELEMENTTYPE> aComparator)
Convert the given iterable object to a sorted list.
|
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
getSorted(Iterator<? extends ELEMENTTYPE> aIter)
Convert the given iterator to a sorted list.
|
static <ELEMENTTYPE> |
getSorted(Iterator<? extends ELEMENTTYPE> aIter,
Comparator<? super ELEMENTTYPE> aComparator)
Convert the given iterator to a sorted list.
|
static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> |
getSortedByKey(Map<KEYTYPE,VALUETYPE> aMap)
Get a map sorted by aIter's keys.
|
static <KEYTYPE,VALUETYPE> |
getSortedByKey(Map<KEYTYPE,VALUETYPE> aMap,
Comparator<? super KEYTYPE> aKeyComparator)
Get a map sorted by its keys.
|
static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> |
getSortedByKey(Map<KEYTYPE,VALUETYPE> aMap,
ESortOrder eSortOrder)
Get a map sorted by its keys.
|
static <KEYTYPE,VALUETYPE extends Comparable<? super VALUETYPE>> |
getSortedByValue(Map<KEYTYPE,VALUETYPE> aMap)
Get a map sorted by its values.
|
static <KEYTYPE,VALUETYPE> |
getSortedByValue(Map<KEYTYPE,VALUETYPE> aMap,
Comparator<? super VALUETYPE> aValueComparator)
Get a map sorted by aIter's values.
|
static <KEYTYPE,VALUETYPE extends Comparable<? super VALUETYPE>> |
getSortedByValue(Map<KEYTYPE,VALUETYPE> aMap,
ESortOrder eSortOrder)
Get a map sorted by its values.
|
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
getSortedInline(List<ELEMENTTYPE> aList) |
static <ELEMENTTYPE> |
getSortedInline(List<ELEMENTTYPE> aList,
Comparator<? super ELEMENTTYPE> aComparator) |
static <ELEMENTTYPE> |
getStackCopyWithoutTop(NonBlockingStack<ELEMENTTYPE> aStack) |
static <ELEMENTTYPE> |
getSubList(List<ELEMENTTYPE> aCont,
int nStartIndex,
int nSectionLength)
Gets a sublist excerpt of the passed list.
|
static <KEYTYPE,VALUETYPE> |
getSwappedKeyValues(Map<KEYTYPE,VALUETYPE> aMap)
Get a map where keys and values are exchanged.
|
static boolean |
isCollectionClass(Class<?> aClass) |
static boolean |
isCollectionObject(Object aObj) |
static boolean |
isEmpty(Collection<?> aCont) |
static boolean |
isEmpty(Enumeration<?> aEnum) |
static boolean |
isEmpty(IIterableIterator<?> aIter) |
static boolean |
isEmpty(Iterable<?> aCont) |
static boolean |
isEmpty(Iterator<?> aIter) |
static boolean |
isEmpty(Map<?,?> aCont) |
static boolean |
isNotEmpty(Collection<?> aCont) |
static boolean |
isNotEmpty(Enumeration<?> aEnum) |
static boolean |
isNotEmpty(IIterableIterator<?> aIter) |
static boolean |
isNotEmpty(Iterable<?> aCont) |
static boolean |
isNotEmpty(Iterator<?> aIter) |
static boolean |
isNotEmpty(Map<?,?> aCont) |
static <ELEMENTTYPE> |
makeUnmodifiable(Collection<? extends ELEMENTTYPE> aCollection) |
static <ELEMENTTYPE> |
makeUnmodifiable(List<? extends ELEMENTTYPE> aList) |
static <KEYTYPE,VALUETYPE> |
makeUnmodifiable(Map<? extends KEYTYPE,? extends VALUETYPE> aMap) |
static <ELEMENTTYPE> |
makeUnmodifiable(Set<? extends ELEMENTTYPE> aSet) |
static <KEYTYPE,VALUETYPE> |
makeUnmodifiable(SortedMap<KEYTYPE,? extends VALUETYPE> aSortedMap) |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
makeUnmodifiable(SortedSet<ELEMENTTYPE> aSortedSet) |
static <ELEMENTTYPE> |
makeUnmodifiableNotNull(Collection<? extends ELEMENTTYPE> aCollection) |
static <ELEMENTTYPE> |
makeUnmodifiableNotNull(List<? extends ELEMENTTYPE> aList) |
static <KEYTYPE,VALUETYPE> |
makeUnmodifiableNotNull(Map<? extends KEYTYPE,? extends VALUETYPE> aMap) |
static <ELEMENTTYPE> |
makeUnmodifiableNotNull(Set<? extends ELEMENTTYPE> aSet) |
static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> |
makeUnmodifiableNotNull(SortedMap<KEYTYPE,? extends VALUETYPE> aSortedMap) |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
makeUnmodifiableNotNull(SortedSet<ELEMENTTYPE> aSortedSet) |
static List<Boolean> |
newBooleanList(boolean... aValues) |
static Set<Boolean> |
newBooleanOrderedSet(boolean... aValues) |
static Set<Boolean> |
newBooleanSet(boolean... aValues) |
static TreeSet<Boolean> |
newBooleanSortedSet(boolean... aValues) |
static Vector<Boolean> |
newBooleanVector(boolean... aValues) |
static List<Byte> |
newByteList(byte... aValues) |
static Set<Byte> |
newByteOrderedSet(byte... aValues) |
static Set<Byte> |
newByteSet(byte... aValues) |
static TreeSet<Byte> |
newByteSortedSet(byte... aValues) |
static Vector<Byte> |
newByteVector(byte... aValues) |
static List<Character> |
newCharList(char... aValues) |
static Set<Character> |
newCharOrderedSet(char... aValues) |
static Set<Character> |
newCharSet(char... aValues) |
static TreeSet<Character> |
newCharSortedSet(char... aValues) |
static Vector<Character> |
newCharVector(char... aValues) |
static List<Double> |
newDoubleList(double... aValues) |
static Set<Double> |
newDoubleOrderedSet(double... aValues) |
static Set<Double> |
newDoubleSet(double... aValues) |
static TreeSet<Double> |
newDoubleSortedSet(double... aValues) |
static Vector<Double> |
newDoubleVector(double... aValues) |
static <ELEMENTTYPE extends Enum<ELEMENTTYPE>> |
newEnumSet(Class<ELEMENTTYPE> aEnumClass,
Collection<ELEMENTTYPE> aValues) |
static <ELEMENTTYPE extends Enum<ELEMENTTYPE>> |
newEnumSet(Class<ELEMENTTYPE> aEnumClass,
ELEMENTTYPE... aValues) |
static <ELEMENTTYPE extends Enum<ELEMENTTYPE>> |
newEnumSet(Class<ELEMENTTYPE> aEnumClass,
EnumSet<ELEMENTTYPE> aValues) |
static List<Float> |
newFloatList(float... aValues) |
static Set<Float> |
newFloatOrderedSet(float... aValues) |
static Set<Float> |
newFloatSet(float... aValues) |
static TreeSet<Float> |
newFloatSortedSet(float... aValues) |
static Vector<Float> |
newFloatVector(float... aValues) |
static List<Integer> |
newIntList(int... aValues) |
static Set<Integer> |
newIntOrderedSet(int... aValues) |
static Set<Integer> |
newIntSet(int... aValues) |
static TreeSet<Integer> |
newIntSortedSet(int... aValues) |
static Vector<Integer> |
newIntVector(int... aValues) |
static <ELEMENTTYPE> |
newList() |
static <ELEMENTTYPE> |
newList(Collection<? extends ELEMENTTYPE> aCont) |
static <ELEMENTTYPE> |
newList(ELEMENTTYPE... aValues) |
static <ELEMENTTYPE> |
newList(ELEMENTTYPE aValue) |
static <ELEMENTTYPE> |
newList(Enumeration<? extends ELEMENTTYPE> aEnum)
Compared to
Collections.list(Enumeration) this method is more
flexible in Generics parameter. |
static <ELEMENTTYPE> |
newList(IIterableIterator<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newList(Iterable<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newList(Iterator<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newListPrefilled(ELEMENTTYPE aValue,
int nElements) |
static List<Long> |
newLongList(long... aValues) |
static Set<Long> |
newLongOrderedSet(long... aValues) |
static Set<Long> |
newLongSet(long... aValues) |
static TreeSet<Long> |
newLongSortedSet(long... aValues) |
static Vector<Long> |
newLongVector(long... aValues) |
static <KEYTYPE,VALUETYPE> |
newMap() |
static <KEYTYPE,VALUETYPE> |
newMap(Collection<? extends KEYTYPE> aKeys,
Collection<? extends VALUETYPE> aValues) |
static <KEYTYPE,VALUETYPE> |
newMap(Collection<? extends Map.Entry<KEYTYPE,VALUETYPE>> aCollection) |
static <ELEMENTTYPE> |
newMap(ELEMENTTYPE... aValues) |
static <KEYTYPE,VALUETYPE> |
newMap(KEYTYPE[] aKeys,
VALUETYPE[] aValues) |
static <KEYTYPE,VALUETYPE> |
newMap(KEYTYPE aKey,
VALUETYPE aValue) |
static <KEYTYPE,VALUETYPE> |
newMap(Map<? extends KEYTYPE,? extends VALUETYPE> aMap) |
static <KEYTYPE,VALUETYPE> |
newMap(Map<? extends KEYTYPE,? extends VALUETYPE>[] aMaps) |
static List<Boolean> |
newObjectListFromArray(boolean[] aArray) |
static List<Byte> |
newObjectListFromArray(byte[] aArray) |
static List<Character> |
newObjectListFromArray(char[] aArray) |
static List<Double> |
newObjectListFromArray(double[] aArray) |
static List<Float> |
newObjectListFromArray(float[] aArray) |
static List<Integer> |
newObjectListFromArray(int[] aArray) |
static List<Long> |
newObjectListFromArray(long[] aArray) |
static List<?> |
newObjectListFromArray(Object aValue,
Class<?> aComponentType) |
static List<Short> |
newObjectListFromArray(short[] aArray) |
static <KEYTYPE,VALUETYPE> |
newOrderedMap() |
static <KEYTYPE,VALUETYPE> |
newOrderedMap(Collection<? extends KEYTYPE> aKeys,
Collection<? extends VALUETYPE> aValues) |
static <KEYTYPE,VALUETYPE> |
newOrderedMap(Collection<? extends Map.Entry<KEYTYPE,VALUETYPE>> aCollection) |
static <ELEMENTTYPE> |
newOrderedMap(ELEMENTTYPE... aValues) |
static <KEYTYPE,VALUETYPE> |
newOrderedMap(KEYTYPE[] aKeys,
VALUETYPE[] aValues)
Retrieve a map that is ordered in the way the parameter arrays are passed
in.
|
static <KEYTYPE,VALUETYPE> |
newOrderedMap(KEYTYPE aKey,
VALUETYPE aValue) |
static <KEYTYPE,VALUETYPE> |
newOrderedMap(Map<? extends KEYTYPE,? extends VALUETYPE> aMap) |
static <KEYTYPE,VALUETYPE> |
newOrderedMap(Map<? extends KEYTYPE,? extends VALUETYPE>[] aMaps) |
static <ELEMENTTYPE> |
newOrderedSet() |
static <ELEMENTTYPE> |
newOrderedSet(Collection<? extends ELEMENTTYPE> aCont) |
static <ELEMENTTYPE> |
newOrderedSet(ELEMENTTYPE... aValues) |
static <ELEMENTTYPE> |
newOrderedSet(ELEMENTTYPE aValue) |
static <ELEMENTTYPE> |
newOrderedSet(Enumeration<? extends ELEMENTTYPE> aEnum) |
static <ELEMENTTYPE> |
newOrderedSet(IIterableIterator<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newOrderedSet(Iterable<? extends ELEMENTTYPE> aCont) |
static <ELEMENTTYPE> |
newOrderedSet(Iterator<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newQueue() |
static <ELEMENTTYPE> |
newQueue(Collection<? extends ELEMENTTYPE> aCont) |
static <ELEMENTTYPE> |
newQueue(ELEMENTTYPE... aValues) |
static <ELEMENTTYPE> |
newQueue(ELEMENTTYPE aValue) |
static <ELEMENTTYPE> |
newQueue(Enumeration<? extends ELEMENTTYPE> aEnum)
Compared to
Collections.list(Enumeration) this method is more
flexible in Generics parameter. |
static <ELEMENTTYPE> |
newQueue(IIterableIterator<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newQueue(Iterable<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newQueue(Iterator<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newSet() |
static <ELEMENTTYPE> |
newSet(Collection<? extends ELEMENTTYPE> aCont) |
static <ELEMENTTYPE> |
newSet(ELEMENTTYPE... aValues) |
static <ELEMENTTYPE> |
newSet(ELEMENTTYPE aValue) |
static <ELEMENTTYPE> |
newSet(Enumeration<? extends ELEMENTTYPE> aEnum) |
static <ELEMENTTYPE> |
newSet(IIterableIterator<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newSet(Iterable<? extends ELEMENTTYPE> aCont) |
static <ELEMENTTYPE> |
newSet(Iterator<? extends ELEMENTTYPE> aIter) |
static List<Short> |
newShortList(short... aValues) |
static Set<Short> |
newShortOrderedSet(short... aValues) |
static Set<Short> |
newShortSet(short... aValues) |
static TreeSet<Short> |
newShortSortedSet(short... aValues) |
static Vector<Short> |
newShortVector(short... aValues) |
static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> |
newSortedMap() |
static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> |
newSortedMap(Collection<? extends KEYTYPE> aKeys,
Collection<? extends VALUETYPE> aValues) |
static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> |
newSortedMap(Collection<? extends Map.Entry<KEYTYPE,VALUETYPE>> aCollection) |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
newSortedMap(ELEMENTTYPE... aValues) |
static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> |
newSortedMap(KEYTYPE[] aKeys,
VALUETYPE[] aValues) |
static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> |
newSortedMap(KEYTYPE aKey,
VALUETYPE aValue) |
static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> |
newSortedMap(Map<? extends KEYTYPE,? extends VALUETYPE> aMap) |
static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> |
newSortedMap(Map<? extends KEYTYPE,? extends VALUETYPE>[] aMaps) |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
newSortedSet() |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
newSortedSet(Collection<? extends ELEMENTTYPE> aCont) |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
newSortedSet(ELEMENTTYPE... aValues) |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
newSortedSet(ELEMENTTYPE aValue) |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
newSortedSet(Enumeration<? extends ELEMENTTYPE> aEnum) |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
newSortedSet(IIterableIterator<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
newSortedSet(Iterable<? extends ELEMENTTYPE> aCont) |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
newSortedSet(Iterator<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newStack() |
static <ELEMENTTYPE> |
newStack(Collection<? extends ELEMENTTYPE> aValues)
Create a new stack from the given collection.
|
static <ELEMENTTYPE> |
newStack(ELEMENTTYPE... aValues)
Create a new stack from the given array.
|
static <ELEMENTTYPE> |
newStack(ELEMENTTYPE aValue)
Create a new stack with a single element.
|
static List<Boolean> |
newUnmodifiableBooleanList(boolean... aValues) |
static Set<Boolean> |
newUnmodifiableBooleanOrderedSet(boolean... aValues) |
static Set<Boolean> |
newUnmodifiableBooleanSet(boolean... aValues) |
static SortedSet<Boolean> |
newUnmodifiableBooleanSortedSet(boolean... aValues) |
static List<Byte> |
newUnmodifiableByteList(byte... aValues) |
static Set<Byte> |
newUnmodifiableByteOrderedSet(byte... aValues) |
static Set<Byte> |
newUnmodifiableByteSet(byte... aValues) |
static SortedSet<Byte> |
newUnmodifiableByteSortedSet(byte... aValues) |
static List<Character> |
newUnmodifiableCharList(char... aValues) |
static Set<Character> |
newUnmodifiableCharOrderedSet(char... aValues) |
static Set<Character> |
newUnmodifiableCharSet(char... aValues) |
static SortedSet<Character> |
newUnmodifiableCharSortedSet(char... aValues) |
static List<Double> |
newUnmodifiableDoubleList(double... aValues) |
static Set<Double> |
newUnmodifiableDoubleOrderedSet(double... aValues) |
static Set<Double> |
newUnmodifiableDoubleSet(double... aValues) |
static SortedSet<Double> |
newUnmodifiableDoubleSortedSet(double... aValues) |
static List<Float> |
newUnmodifiableFloatList(float... aValues) |
static Set<Float> |
newUnmodifiableFloatOrderedSet(float... aValues) |
static Set<Float> |
newUnmodifiableFloatSet(float... aValues) |
static SortedSet<Float> |
newUnmodifiableFloatSortedSet(float... aValues) |
static List<Integer> |
newUnmodifiableIntList(int... aValues) |
static Set<Integer> |
newUnmodifiableIntOrderedSet(int... aValues) |
static Set<Integer> |
newUnmodifiableIntSet(int... aValues) |
static SortedSet<Integer> |
newUnmodifiableIntSortedSet(int... aValues) |
static <ELEMENTTYPE> |
newUnmodifiableList() |
static <ELEMENTTYPE> |
newUnmodifiableList(Collection<? extends ELEMENTTYPE> aCont) |
static <ELEMENTTYPE> |
newUnmodifiableList(ELEMENTTYPE... aValues) |
static <ELEMENTTYPE> |
newUnmodifiableList(ELEMENTTYPE aValue) |
static <ELEMENTTYPE> |
newUnmodifiableList(Enumeration<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newUnmodifiableList(IIterableIterator<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newUnmodifiableList(Iterable<? extends ELEMENTTYPE> aCont) |
static <ELEMENTTYPE> |
newUnmodifiableList(Iterator<? extends ELEMENTTYPE> aIter) |
static List<Long> |
newUnmodifiableLongList(long... aValues) |
static Set<Long> |
newUnmodifiableLongOrderedSet(long... aValues) |
static Set<Long> |
newUnmodifiableLongSet(long... aValues) |
static SortedSet<Long> |
newUnmodifiableLongSortedSet(long... aValues) |
static <KEYTYPE,VALUETYPE> |
newUnmodifiableMap() |
static <KEYTYPE,VALUETYPE> |
newUnmodifiableMap(Collection<? extends KEYTYPE> aKeys,
Collection<? extends VALUETYPE> aValues) |
static <KEYTYPE,VALUETYPE> |
newUnmodifiableMap(Collection<? extends Map.Entry<KEYTYPE,VALUETYPE>> aCollection) |
static <ELEMENTTYPE> |
newUnmodifiableMap(ELEMENTTYPE... aValues) |
static <KEYTYPE,VALUETYPE> |
newUnmodifiableMap(KEYTYPE[] aKeys,
VALUETYPE[] aValues) |
static <KEYTYPE,VALUETYPE> |
newUnmodifiableMap(KEYTYPE aKey,
VALUETYPE aValue) |
static <KEYTYPE,VALUETYPE> |
newUnmodifiableMap(Map<? extends KEYTYPE,? extends VALUETYPE> aMap) |
static <KEYTYPE,VALUETYPE> |
newUnmodifiableMap(Map<? extends KEYTYPE,? extends VALUETYPE>[] aMaps) |
static <KEYTYPE,VALUETYPE> |
newUnmodifiableOrderedMap() |
static <KEYTYPE,VALUETYPE> |
newUnmodifiableOrderedMap(Collection<? extends KEYTYPE> aKeys,
Collection<? extends VALUETYPE> aValues) |
static <KEYTYPE,VALUETYPE> |
newUnmodifiableOrderedMap(Collection<? extends Map.Entry<KEYTYPE,VALUETYPE>> aCollection) |
static <ELEMENTTYPE> |
newUnmodifiableOrderedMap(ELEMENTTYPE... aValues) |
static <KEYTYPE,VALUETYPE> |
newUnmodifiableOrderedMap(KEYTYPE[] aKeys,
VALUETYPE[] aValues) |
static <KEYTYPE,VALUETYPE> |
newUnmodifiableOrderedMap(KEYTYPE aKey,
VALUETYPE aValue) |
static <KEYTYPE,VALUETYPE> |
newUnmodifiableOrderedMap(Map<? extends KEYTYPE,? extends VALUETYPE> aOrderedMap) |
static <KEYTYPE,VALUETYPE> |
newUnmodifiableOrderedMap(Map<? extends KEYTYPE,? extends VALUETYPE>[] aOrderedMaps) |
static <ELEMENTTYPE> |
newUnmodifiableOrderedSet() |
static <ELEMENTTYPE> |
newUnmodifiableOrderedSet(Collection<? extends ELEMENTTYPE> aCont) |
static <ELEMENTTYPE> |
newUnmodifiableOrderedSet(ELEMENTTYPE... aValues) |
static <ELEMENTTYPE> |
newUnmodifiableOrderedSet(ELEMENTTYPE aValue) |
static <ELEMENTTYPE> |
newUnmodifiableOrderedSet(Enumeration<? extends ELEMENTTYPE> aEnum) |
static <ELEMENTTYPE> |
newUnmodifiableOrderedSet(IIterableIterator<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newUnmodifiableOrderedSet(Iterable<? extends ELEMENTTYPE> aCont) |
static <ELEMENTTYPE> |
newUnmodifiableOrderedSet(Iterator<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newUnmodifiableSet() |
static <ELEMENTTYPE> |
newUnmodifiableSet(Collection<? extends ELEMENTTYPE> aCont) |
static <ELEMENTTYPE> |
newUnmodifiableSet(ELEMENTTYPE... aValues) |
static <ELEMENTTYPE> |
newUnmodifiableSet(ELEMENTTYPE aValue) |
static <ELEMENTTYPE> |
newUnmodifiableSet(Enumeration<? extends ELEMENTTYPE> aEnum) |
static <ELEMENTTYPE> |
newUnmodifiableSet(IIterableIterator<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newUnmodifiableSet(Iterable<? extends ELEMENTTYPE> aCont) |
static <ELEMENTTYPE> |
newUnmodifiableSet(Iterator<? extends ELEMENTTYPE> aIter) |
static List<Short> |
newUnmodifiableShortList(short... aValues) |
static Set<Short> |
newUnmodifiableShortOrderedSet(short... aValues) |
static Set<Short> |
newUnmodifiableShortSet(short... aValues) |
static SortedSet<Short> |
newUnmodifiableShortSortedSet(short... aValues) |
static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> |
newUnmodifiableSortedMap() |
static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> |
newUnmodifiableSortedMap(Collection<? extends KEYTYPE> aKeys,
Collection<? extends VALUETYPE> aValues) |
static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> |
newUnmodifiableSortedMap(Collection<? extends Map.Entry<KEYTYPE,VALUETYPE>> aCollection) |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
newUnmodifiableSortedMap(ELEMENTTYPE... aValues) |
static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> |
newUnmodifiableSortedMap(KEYTYPE[] aKeys,
VALUETYPE[] aValues) |
static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> |
newUnmodifiableSortedMap(KEYTYPE aKey,
VALUETYPE aValue) |
static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> |
newUnmodifiableSortedMap(Map<KEYTYPE,? extends VALUETYPE>[] aMaps) |
static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> |
newUnmodifiableSortedMap(SortedMap<KEYTYPE,? extends VALUETYPE> aMap) |
static <ELEMENTTYPE> |
newUnmodifiableSortedSet() |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
newUnmodifiableSortedSet(Collection<? extends ELEMENTTYPE> aCont) |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
newUnmodifiableSortedSet(ELEMENTTYPE... aValues) |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
newUnmodifiableSortedSet(ELEMENTTYPE aValue) |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
newUnmodifiableSortedSet(Enumeration<? extends ELEMENTTYPE> aEnum) |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
newUnmodifiableSortedSet(IIterableIterator<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
newUnmodifiableSortedSet(Iterable<? extends ELEMENTTYPE> aCont) |
static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> |
newUnmodifiableSortedSet(Iterator<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newVector() |
static <ELEMENTTYPE> |
newVector(Collection<? extends ELEMENTTYPE> aCont) |
static <ELEMENTTYPE> |
newVector(ELEMENTTYPE... aValues) |
static <ELEMENTTYPE> |
newVector(ELEMENTTYPE aValue) |
static <ELEMENTTYPE> |
newVector(Enumeration<? extends ELEMENTTYPE> aEnum)
Compared to
Collections.list(Enumeration) this method is more
flexible in Generics parameter. |
static <ELEMENTTYPE> |
newVector(IIterableIterator<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newVector(Iterable<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newVector(Iterator<? extends ELEMENTTYPE> aIter) |
static <ELEMENTTYPE> |
newVectorPrefilled(ELEMENTTYPE aValue,
int nElements) |
static <ELEMENTTYPE> |
removeAndReturnElementAtIndex(List<ELEMENTTYPE> aList,
int nIndex)
Remove the element at the specified index from the passed list.
|
static EChange |
removeElementAtIndex(List<?> aList,
int nIndex)
Remove the element at the specified index from the passed list.
|
static <ELEMENTTYPE> |
removeFirstElement(List<ELEMENTTYPE> aList) |
static <ELEMENTTYPE> |
removeLastElement(List<ELEMENTTYPE> aList) |
@Nullable public static ECollectionBaseType getCollectionBaseTypeOfClass(@Nullable Class<?> aClass)
@Nullable public static ECollectionBaseType getCollectionBaseTypeOfObject(@Nullable Object aObj)
@Nonnull public static List<?> getAsList(@Nonnull Object aObj)
List object. This is helpful in case you
want to compare the String array ["a", "b"] with the List<String>
("a", "b") If the passed object is not a recognized. container type, than a
new list with one element is created!aObj - The object to be converted. May not be null.null.@Nonnull public static <ELEMENTTYPE> List<? extends ELEMENTTYPE> getNotNull(@Nullable List<? extends ELEMENTTYPE> aList)
@Nonnull public static <ELEMENTTYPE> Set<? extends ELEMENTTYPE> getNotNull(@Nullable Set<? extends ELEMENTTYPE> aSet)
@Nonnull public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> SortedSet<? extends ELEMENTTYPE> getNotNull(@Nullable SortedSet<? extends ELEMENTTYPE> aSortedSet)
@Nonnull public static <KEYTYPE,VALUETYPE> Map<? extends KEYTYPE,? extends VALUETYPE> getNotNull(@Nullable Map<? extends KEYTYPE,? extends VALUETYPE> aMap)
@Nonnull public static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> SortedMap<? extends KEYTYPE,? extends VALUETYPE> getNotNull(@Nullable SortedMap<? extends KEYTYPE,? extends VALUETYPE> aSortedMap)
@Nullable @ReturnsImmutableObject public static <ELEMENTTYPE> Collection<ELEMENTTYPE> makeUnmodifiable(@Nullable Collection<? extends ELEMENTTYPE> aCollection)
@Nullable @ReturnsImmutableObject public static <ELEMENTTYPE> List<ELEMENTTYPE> makeUnmodifiable(@Nullable List<? extends ELEMENTTYPE> aList)
@Nullable @ReturnsImmutableObject public static <ELEMENTTYPE> Set<ELEMENTTYPE> makeUnmodifiable(@Nullable Set<? extends ELEMENTTYPE> aSet)
@Nullable @ReturnsImmutableObject public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> makeUnmodifiable(@Nullable Map<? extends KEYTYPE,? extends VALUETYPE> aMap)
@Nullable @ReturnsImmutableObject public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> SortedSet<ELEMENTTYPE> makeUnmodifiable(@Nullable SortedSet<ELEMENTTYPE> aSortedSet)
@Nullable @ReturnsImmutableObject public static <KEYTYPE,VALUETYPE> SortedMap<KEYTYPE,VALUETYPE> makeUnmodifiable(@Nullable SortedMap<KEYTYPE,? extends VALUETYPE> aSortedMap)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Collection<ELEMENTTYPE> makeUnmodifiableNotNull(@Nullable Collection<? extends ELEMENTTYPE> aCollection)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> List<ELEMENTTYPE> makeUnmodifiableNotNull(@Nullable List<? extends ELEMENTTYPE> aList)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Set<ELEMENTTYPE> makeUnmodifiableNotNull(@Nullable Set<? extends ELEMENTTYPE> aSet)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> makeUnmodifiableNotNull(@Nullable Map<? extends KEYTYPE,? extends VALUETYPE> aMap)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> SortedSet<ELEMENTTYPE> makeUnmodifiableNotNull(@Nullable SortedSet<ELEMENTTYPE> aSortedSet)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> SortedMap<KEYTYPE,VALUETYPE> makeUnmodifiableNotNull(@Nullable SortedMap<KEYTYPE,? extends VALUETYPE> aSortedMap)
@Nullable @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> getDifference(@Nullable Collection<? extends ELEMENTTYPE> aCollection1, @Nullable Collection<? extends ELEMENTTYPE> aCollection2)
aCont1 - aCont2.ELEMENTTYPE - Set element typeaCollection1 - The first container. May be null or empty.aCollection2 - The second container. May be null or empty.null. Returns an empty set,
if the first container is empty. Returns a copy of the first
container, if the second container is empty. Returns
aCont1 - aCont2 if both containers are non-empty.@Nullable @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> getIntersected(@Nullable Collection<? extends ELEMENTTYPE> aCollection1, @Nullable Collection<? extends ELEMENTTYPE> aCollection2)
ELEMENTTYPE - Collection element typeaCollection1 - The first container. May be null or empty.aCollection2 - The second container. May be null or empty.null.@Nonnull @ReturnsMutableCopy public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newMap()
@Nonnull @ReturnsMutableCopy public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newMap(@Nullable KEYTYPE aKey, @Nullable VALUETYPE aValue)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Map<ELEMENTTYPE,ELEMENTTYPE> newMap(@Nullable ELEMENTTYPE... aValues)
@Nonnull @ReturnsMutableCopy public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newMap(@Nullable KEYTYPE[] aKeys, @Nullable VALUETYPE[] aValues)
@Nonnull @ReturnsMutableCopy public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newMap(@Nullable Collection<? extends KEYTYPE> aKeys, @Nullable Collection<? extends VALUETYPE> aValues)
@Nonnull @ReturnsMutableCopy public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newMap(@Nullable Map<? extends KEYTYPE,? extends VALUETYPE> aMap)
@Nonnull @ReturnsMutableCopy public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newMap(@Nullable Map<? extends KEYTYPE,? extends VALUETYPE>[] aMaps)
@Nonnull @ReturnsMutableCopy public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newMap(@Nullable Collection<? extends Map.Entry<KEYTYPE,VALUETYPE>> aCollection)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newUnmodifiableMap()
@Nonnull @ReturnsImmutableObject public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newUnmodifiableMap(@Nullable KEYTYPE aKey, @Nullable VALUETYPE aValue)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Map<ELEMENTTYPE,ELEMENTTYPE> newUnmodifiableMap(@Nullable ELEMENTTYPE... aValues)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newUnmodifiableMap(@Nullable KEYTYPE[] aKeys, @Nullable VALUETYPE[] aValues)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newUnmodifiableMap(@Nullable Collection<? extends KEYTYPE> aKeys, @Nullable Collection<? extends VALUETYPE> aValues)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newUnmodifiableMap(@Nullable Map<? extends KEYTYPE,? extends VALUETYPE> aMap)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newUnmodifiableMap(@Nullable Map<? extends KEYTYPE,? extends VALUETYPE>[] aMaps)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newUnmodifiableMap(@Nullable Collection<? extends Map.Entry<KEYTYPE,VALUETYPE>> aCollection)
@Nonnull @ReturnsMutableCopy public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newOrderedMap()
@Nonnull @ReturnsMutableCopy public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newOrderedMap(@Nullable KEYTYPE aKey, @Nullable VALUETYPE aValue)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Map<ELEMENTTYPE,ELEMENTTYPE> newOrderedMap(@Nullable ELEMENTTYPE... aValues)
@Nonnull @ReturnsMutableCopy public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newOrderedMap(@Nullable KEYTYPE[] aKeys, @Nullable VALUETYPE[] aValues)
KEYTYPE - The key type.VALUETYPE - The value type.aKeys - The key array to use. May not be null.aValues - The value array to use. May not be null.LinkedHashMap containing the passed key-value
entries. Never null.@Nonnull @ReturnsMutableCopy public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newOrderedMap(@Nullable Collection<? extends KEYTYPE> aKeys, @Nullable Collection<? extends VALUETYPE> aValues)
@Nonnull @ReturnsMutableCopy public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newOrderedMap(@Nullable Map<? extends KEYTYPE,? extends VALUETYPE> aMap)
@Nonnull @ReturnsMutableCopy public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newOrderedMap(@Nullable Map<? extends KEYTYPE,? extends VALUETYPE>[] aMaps)
@Nonnull @ReturnsMutableCopy public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newOrderedMap(@Nullable Collection<? extends Map.Entry<KEYTYPE,VALUETYPE>> aCollection)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newUnmodifiableOrderedMap()
@Nonnull @ReturnsImmutableObject public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newUnmodifiableOrderedMap(@Nullable KEYTYPE aKey, @Nullable VALUETYPE aValue)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Map<ELEMENTTYPE,ELEMENTTYPE> newUnmodifiableOrderedMap(@Nullable ELEMENTTYPE... aValues)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newUnmodifiableOrderedMap(@Nullable KEYTYPE[] aKeys, @Nullable VALUETYPE[] aValues)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newUnmodifiableOrderedMap(@Nullable Collection<? extends KEYTYPE> aKeys, @Nullable Collection<? extends VALUETYPE> aValues)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newUnmodifiableOrderedMap(@Nullable Map<? extends KEYTYPE,? extends VALUETYPE> aOrderedMap)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newUnmodifiableOrderedMap(@Nullable Map<? extends KEYTYPE,? extends VALUETYPE>[] aOrderedMaps)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> newUnmodifiableOrderedMap(@Nullable Collection<? extends Map.Entry<KEYTYPE,VALUETYPE>> aCollection)
@Nonnull @ReturnsMutableCopy public static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> TreeMap<KEYTYPE,VALUETYPE> newSortedMap()
@Nonnull @ReturnsMutableCopy public static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> TreeMap<KEYTYPE,VALUETYPE> newSortedMap(@Nullable KEYTYPE aKey, @Nullable VALUETYPE aValue)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> TreeMap<ELEMENTTYPE,ELEMENTTYPE> newSortedMap(@Nullable ELEMENTTYPE... aValues)
@Nonnull @ReturnsMutableCopy public static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> TreeMap<KEYTYPE,VALUETYPE> newSortedMap(@Nullable KEYTYPE[] aKeys, @Nullable VALUETYPE[] aValues)
@Nonnull @ReturnsMutableCopy public static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> TreeMap<KEYTYPE,VALUETYPE> newSortedMap(@Nullable Collection<? extends KEYTYPE> aKeys, @Nullable Collection<? extends VALUETYPE> aValues)
@Nonnull @ReturnsMutableCopy public static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> TreeMap<KEYTYPE,VALUETYPE> newSortedMap(@Nullable Map<? extends KEYTYPE,? extends VALUETYPE> aMap)
@Nonnull @ReturnsMutableCopy public static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> TreeMap<KEYTYPE,VALUETYPE> newSortedMap(@Nullable Map<? extends KEYTYPE,? extends VALUETYPE>[] aMaps)
@Nonnull @ReturnsMutableCopy public static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> TreeMap<KEYTYPE,VALUETYPE> newSortedMap(@Nullable Collection<? extends Map.Entry<KEYTYPE,VALUETYPE>> aCollection)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> SortedMap<KEYTYPE,VALUETYPE> newUnmodifiableSortedMap()
@Nonnull @ReturnsImmutableObject public static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> SortedMap<KEYTYPE,VALUETYPE> newUnmodifiableSortedMap(@Nullable KEYTYPE aKey, @Nullable VALUETYPE aValue)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> SortedMap<ELEMENTTYPE,ELEMENTTYPE> newUnmodifiableSortedMap(@Nullable ELEMENTTYPE... aValues)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> SortedMap<KEYTYPE,VALUETYPE> newUnmodifiableSortedMap(@Nullable KEYTYPE[] aKeys, @Nullable VALUETYPE[] aValues)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> SortedMap<KEYTYPE,VALUETYPE> newUnmodifiableSortedMap(@Nullable Collection<? extends KEYTYPE> aKeys, @Nullable Collection<? extends VALUETYPE> aValues)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> SortedMap<KEYTYPE,VALUETYPE> newUnmodifiableSortedMap(@Nullable SortedMap<KEYTYPE,? extends VALUETYPE> aMap)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> SortedMap<KEYTYPE,VALUETYPE> newUnmodifiableSortedMap(@Nullable Map<KEYTYPE,? extends VALUETYPE>[] aMaps)
@Nonnull @ReturnsImmutableObject public static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> SortedMap<KEYTYPE,VALUETYPE> newUnmodifiableSortedMap(@Nullable Collection<? extends Map.Entry<KEYTYPE,VALUETYPE>> aCollection)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> newSet()
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> newSet(@Nullable ELEMENTTYPE aValue)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> newSet(@Nullable ELEMENTTYPE... aValues)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> newSet(@Nullable Iterable<? extends ELEMENTTYPE> aCont)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> newSet(@Nullable Collection<? extends ELEMENTTYPE> aCont)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> newSet(@Nullable Iterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> newSet(@Nullable IIterableIterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> newSet(@Nullable Enumeration<? extends ELEMENTTYPE> aEnum)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE extends Enum<ELEMENTTYPE>> EnumSet<ELEMENTTYPE> newEnumSet(@Nonnull Class<ELEMENTTYPE> aEnumClass, @Nullable ELEMENTTYPE... aValues)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE extends Enum<ELEMENTTYPE>> EnumSet<ELEMENTTYPE> newEnumSet(@Nonnull Class<ELEMENTTYPE> aEnumClass, @Nullable Collection<ELEMENTTYPE> aValues)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE extends Enum<ELEMENTTYPE>> EnumSet<ELEMENTTYPE> newEnumSet(@Nonnull Class<ELEMENTTYPE> aEnumClass, @Nullable EnumSet<ELEMENTTYPE> aValues)
@Nonnull @ReturnsMutableCopy public static Set<Boolean> newBooleanSet(@Nullable boolean... aValues)
@Nonnull @ReturnsMutableCopy public static Set<Byte> newByteSet(@Nullable byte... aValues)
@Nonnull @ReturnsMutableCopy public static Set<Character> newCharSet(@Nullable char... aValues)
@Nonnull @ReturnsMutableCopy public static Set<Double> newDoubleSet(@Nullable double... aValues)
@Nonnull @ReturnsMutableCopy public static Set<Float> newFloatSet(@Nullable float... aValues)
@Nonnull @ReturnsMutableCopy public static Set<Integer> newIntSet(@Nullable int... aValues)
@Nonnull @ReturnsMutableCopy public static Set<Long> newLongSet(@Nullable long... aValues)
@Nonnull @ReturnsMutableCopy public static Set<Short> newShortSet(@Nullable short... aValues)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Set<ELEMENTTYPE> newUnmodifiableSet()
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Set<ELEMENTTYPE> newUnmodifiableSet(@Nullable ELEMENTTYPE aValue)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Set<ELEMENTTYPE> newUnmodifiableSet(@Nullable ELEMENTTYPE... aValues)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Set<ELEMENTTYPE> newUnmodifiableSet(@Nullable Iterable<? extends ELEMENTTYPE> aCont)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Set<ELEMENTTYPE> newUnmodifiableSet(@Nullable Collection<? extends ELEMENTTYPE> aCont)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Set<ELEMENTTYPE> newUnmodifiableSet(@Nullable Iterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Set<ELEMENTTYPE> newUnmodifiableSet(@Nullable IIterableIterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Set<ELEMENTTYPE> newUnmodifiableSet(@Nullable Enumeration<? extends ELEMENTTYPE> aEnum)
@Nonnull @ReturnsImmutableObject public static Set<Boolean> newUnmodifiableBooleanSet(@Nullable boolean... aValues)
@Nonnull @ReturnsImmutableObject public static Set<Byte> newUnmodifiableByteSet(@Nullable byte... aValues)
@Nonnull @ReturnsImmutableObject public static Set<Character> newUnmodifiableCharSet(@Nullable char... aValues)
@Nonnull @ReturnsImmutableObject public static Set<Double> newUnmodifiableDoubleSet(@Nullable double... aValues)
@Nonnull @ReturnsImmutableObject public static Set<Float> newUnmodifiableFloatSet(@Nullable float... aValues)
@Nonnull @ReturnsImmutableObject public static Set<Integer> newUnmodifiableIntSet(@Nullable int... aValues)
@Nonnull @ReturnsImmutableObject public static Set<Long> newUnmodifiableLongSet(@Nullable long... aValues)
@Nonnull @ReturnsImmutableObject public static Set<Short> newUnmodifiableShortSet(@Nullable short... aValues)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> TreeSet<ELEMENTTYPE> newSortedSet()
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> TreeSet<ELEMENTTYPE> newSortedSet(@Nullable ELEMENTTYPE aValue)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> TreeSet<ELEMENTTYPE> newSortedSet(@Nullable ELEMENTTYPE... aValues)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> TreeSet<ELEMENTTYPE> newSortedSet(@Nullable Iterable<? extends ELEMENTTYPE> aCont)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> TreeSet<ELEMENTTYPE> newSortedSet(@Nullable Collection<? extends ELEMENTTYPE> aCont)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> TreeSet<ELEMENTTYPE> newSortedSet(@Nullable Iterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> TreeSet<ELEMENTTYPE> newSortedSet(@Nullable IIterableIterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> TreeSet<ELEMENTTYPE> newSortedSet(@Nullable Enumeration<? extends ELEMENTTYPE> aEnum)
@Nonnull @ReturnsMutableCopy public static TreeSet<Boolean> newBooleanSortedSet(@Nullable boolean... aValues)
@Nonnull @ReturnsMutableCopy public static TreeSet<Byte> newByteSortedSet(@Nullable byte... aValues)
@Nonnull @ReturnsMutableCopy public static TreeSet<Character> newCharSortedSet(@Nullable char... aValues)
@Nonnull @ReturnsMutableCopy public static TreeSet<Double> newDoubleSortedSet(@Nullable double... aValues)
@Nonnull @ReturnsMutableCopy public static TreeSet<Float> newFloatSortedSet(@Nullable float... aValues)
@Nonnull @ReturnsMutableCopy public static TreeSet<Integer> newIntSortedSet(@Nullable int... aValues)
@Nonnull @ReturnsMutableCopy public static TreeSet<Long> newLongSortedSet(@Nullable long... aValues)
@Nonnull @ReturnsMutableCopy public static TreeSet<Short> newShortSortedSet(@Nullable short... aValues)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> SortedSet<ELEMENTTYPE> newUnmodifiableSortedSet()
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> SortedSet<ELEMENTTYPE> newUnmodifiableSortedSet(@Nullable ELEMENTTYPE aValue)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> SortedSet<ELEMENTTYPE> newUnmodifiableSortedSet(@Nullable ELEMENTTYPE... aValues)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> SortedSet<ELEMENTTYPE> newUnmodifiableSortedSet(@Nullable Iterable<? extends ELEMENTTYPE> aCont)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> SortedSet<ELEMENTTYPE> newUnmodifiableSortedSet(@Nullable Collection<? extends ELEMENTTYPE> aCont)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> SortedSet<ELEMENTTYPE> newUnmodifiableSortedSet(@Nullable Iterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> SortedSet<ELEMENTTYPE> newUnmodifiableSortedSet(@Nullable IIterableIterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> SortedSet<ELEMENTTYPE> newUnmodifiableSortedSet(@Nullable Enumeration<? extends ELEMENTTYPE> aEnum)
@Nonnull @ReturnsImmutableObject public static SortedSet<Boolean> newUnmodifiableBooleanSortedSet(@Nullable boolean... aValues)
@Nonnull @ReturnsImmutableObject public static SortedSet<Byte> newUnmodifiableByteSortedSet(@Nullable byte... aValues)
@Nonnull @ReturnsImmutableObject public static SortedSet<Character> newUnmodifiableCharSortedSet(@Nullable char... aValues)
@Nonnull @ReturnsImmutableObject public static SortedSet<Double> newUnmodifiableDoubleSortedSet(@Nullable double... aValues)
@Nonnull @ReturnsImmutableObject public static SortedSet<Float> newUnmodifiableFloatSortedSet(@Nullable float... aValues)
@Nonnull @ReturnsImmutableObject public static SortedSet<Integer> newUnmodifiableIntSortedSet(@Nullable int... aValues)
@Nonnull @ReturnsImmutableObject public static SortedSet<Long> newUnmodifiableLongSortedSet(@Nullable long... aValues)
@Nonnull @ReturnsImmutableObject public static SortedSet<Short> newUnmodifiableShortSortedSet(@Nullable short... aValues)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> newOrderedSet()
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> newOrderedSet(@Nullable ELEMENTTYPE aValue)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> newOrderedSet(@Nullable ELEMENTTYPE... aValues)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> newOrderedSet(@Nullable Iterable<? extends ELEMENTTYPE> aCont)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> newOrderedSet(@Nullable Collection<? extends ELEMENTTYPE> aCont)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> newOrderedSet(@Nonnull Iterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> newOrderedSet(@Nullable IIterableIterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> newOrderedSet(@Nullable Enumeration<? extends ELEMENTTYPE> aEnum)
@Nonnull @ReturnsMutableCopy public static Set<Boolean> newBooleanOrderedSet(@Nullable boolean... aValues)
@Nonnull @ReturnsMutableCopy public static Set<Byte> newByteOrderedSet(@Nullable byte... aValues)
@Nonnull @ReturnsMutableCopy public static Set<Character> newCharOrderedSet(@Nullable char... aValues)
@Nonnull @ReturnsMutableCopy public static Set<Double> newDoubleOrderedSet(@Nullable double... aValues)
@Nonnull @ReturnsMutableCopy public static Set<Float> newFloatOrderedSet(@Nullable float... aValues)
@Nonnull @ReturnsMutableCopy public static Set<Integer> newIntOrderedSet(@Nullable int... aValues)
@Nonnull @ReturnsMutableCopy public static Set<Long> newLongOrderedSet(@Nullable long... aValues)
@Nonnull @ReturnsMutableCopy public static Set<Short> newShortOrderedSet(@Nullable short... aValues)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Set<ELEMENTTYPE> newUnmodifiableOrderedSet()
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Set<ELEMENTTYPE> newUnmodifiableOrderedSet(@Nullable ELEMENTTYPE aValue)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Set<ELEMENTTYPE> newUnmodifiableOrderedSet(@Nullable ELEMENTTYPE... aValues)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Set<ELEMENTTYPE> newUnmodifiableOrderedSet(@Nonnull Iterable<? extends ELEMENTTYPE> aCont)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Set<ELEMENTTYPE> newUnmodifiableOrderedSet(@Nonnull Collection<? extends ELEMENTTYPE> aCont)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Set<ELEMENTTYPE> newUnmodifiableOrderedSet(@Nonnull Iterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Set<ELEMENTTYPE> newUnmodifiableOrderedSet(@Nonnull IIterableIterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> Set<ELEMENTTYPE> newUnmodifiableOrderedSet(@Nullable Enumeration<? extends ELEMENTTYPE> aEnum)
@Nonnull @ReturnsImmutableObject public static Set<Boolean> newUnmodifiableBooleanOrderedSet(@Nullable boolean... aValues)
@Nonnull @ReturnsImmutableObject public static Set<Byte> newUnmodifiableByteOrderedSet(@Nullable byte... aValues)
@Nonnull @ReturnsImmutableObject public static Set<Character> newUnmodifiableCharOrderedSet(@Nullable char... aValues)
@Nonnull @ReturnsImmutableObject public static Set<Double> newUnmodifiableDoubleOrderedSet(@Nullable double... aValues)
@Nonnull @ReturnsImmutableObject public static Set<Float> newUnmodifiableFloatOrderedSet(@Nullable float... aValues)
@Nonnull @ReturnsImmutableObject public static Set<Integer> newUnmodifiableIntOrderedSet(@Nullable int... aValues)
@Nonnull @ReturnsImmutableObject public static Set<Long> newUnmodifiableLongOrderedSet(@Nullable long... aValues)
@Nonnull @ReturnsImmutableObject public static Set<Short> newUnmodifiableShortOrderedSet(@Nullable short... aValues)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> List<ELEMENTTYPE> newListPrefilled(@Nullable ELEMENTTYPE aValue, @Nonnegative int nElements)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> List<ELEMENTTYPE> newList()
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> List<ELEMENTTYPE> newList(@Nullable ELEMENTTYPE aValue)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> List<ELEMENTTYPE> newList(@Nullable ELEMENTTYPE... aValues)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> List<ELEMENTTYPE> newList(@Nullable Enumeration<? extends ELEMENTTYPE> aEnum)
Collections.list(Enumeration) this method is more
flexible in Generics parameter.ELEMENTTYPE - Type of the elementsaEnum - The enumeration to be convertednull created ArrayList.Collections.list(Enumeration)@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> List<ELEMENTTYPE> newList(@Nullable Iterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> List<ELEMENTTYPE> newList(@Nullable Iterable<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> List<ELEMENTTYPE> newList(@Nullable Collection<? extends ELEMENTTYPE> aCont)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> List<ELEMENTTYPE> newList(@Nullable IIterableIterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Vector<ELEMENTTYPE> newVectorPrefilled(@Nullable ELEMENTTYPE aValue, @Nonnegative int nElements)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Vector<ELEMENTTYPE> newVector()
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Vector<ELEMENTTYPE> newVector(@Nullable ELEMENTTYPE aValue)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Vector<ELEMENTTYPE> newVector(@Nullable ELEMENTTYPE... aValues)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Vector<ELEMENTTYPE> newVector(@Nullable Enumeration<? extends ELEMENTTYPE> aEnum)
Collections.list(Enumeration) this method is more
flexible in Generics parameter.ELEMENTTYPE - Type of the elementsaEnum - The enumeration to be convertednull created Vector.Collections.list(Enumeration)@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Vector<ELEMENTTYPE> newVector(@Nullable Iterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Vector<ELEMENTTYPE> newVector(@Nullable Iterable<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Vector<ELEMENTTYPE> newVector(@Nullable Collection<? extends ELEMENTTYPE> aCont)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Vector<ELEMENTTYPE> newVector(@Nullable IIterableIterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsMutableCopy public static List<Boolean> newBooleanList(@Nullable boolean... aValues)
@Nonnull @ReturnsMutableCopy public static List<Byte> newByteList(@Nullable byte... aValues)
@Nonnull @ReturnsMutableCopy public static List<Character> newCharList(@Nullable char... aValues)
@Nonnull @ReturnsMutableCopy public static List<Double> newDoubleList(@Nullable double... aValues)
@Nonnull @ReturnsMutableCopy public static List<Float> newFloatList(@Nullable float... aValues)
@Nonnull @ReturnsMutableCopy public static List<Integer> newIntList(@Nullable int... aValues)
@Nonnull @ReturnsMutableCopy public static List<Long> newLongList(@Nullable long... aValues)
@Nonnull @ReturnsMutableCopy public static List<Short> newShortList(@Nullable short... aValues)
@Nonnull @ReturnsMutableCopy public static Vector<Boolean> newBooleanVector(@Nullable boolean... aValues)
@Nonnull @ReturnsMutableCopy public static Vector<Byte> newByteVector(@Nullable byte... aValues)
@Nonnull @ReturnsMutableCopy public static Vector<Character> newCharVector(@Nullable char... aValues)
@Nonnull @ReturnsMutableCopy public static Vector<Double> newDoubleVector(@Nullable double... aValues)
@Nonnull @ReturnsMutableCopy public static Vector<Float> newFloatVector(@Nullable float... aValues)
@Nonnull @ReturnsMutableCopy public static Vector<Integer> newIntVector(@Nullable int... aValues)
@Nonnull @ReturnsMutableCopy public static Vector<Long> newLongVector(@Nullable long... aValues)
@Nonnull @ReturnsMutableCopy public static Vector<Short> newShortVector(@Nullable short... aValues)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> List<ELEMENTTYPE> newUnmodifiableList()
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> List<ELEMENTTYPE> newUnmodifiableList(@Nullable ELEMENTTYPE aValue)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> List<ELEMENTTYPE> newUnmodifiableList(@Nullable ELEMENTTYPE... aValues)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> List<ELEMENTTYPE> newUnmodifiableList(@Nullable Enumeration<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> List<ELEMENTTYPE> newUnmodifiableList(@Nullable Iterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> List<ELEMENTTYPE> newUnmodifiableList(@Nullable Iterable<? extends ELEMENTTYPE> aCont)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> List<ELEMENTTYPE> newUnmodifiableList(@Nullable Collection<? extends ELEMENTTYPE> aCont)
@Nonnull @ReturnsImmutableObject public static <ELEMENTTYPE> List<ELEMENTTYPE> newUnmodifiableList(@Nullable IIterableIterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsImmutableObject public static List<Boolean> newUnmodifiableBooleanList(@Nullable boolean... aValues)
@Nonnull @ReturnsImmutableObject public static List<Byte> newUnmodifiableByteList(@Nullable byte... aValues)
@Nonnull @ReturnsImmutableObject public static List<Character> newUnmodifiableCharList(@Nullable char... aValues)
@Nonnull @ReturnsImmutableObject public static List<Double> newUnmodifiableDoubleList(@Nullable double... aValues)
@Nonnull @ReturnsImmutableObject public static List<Float> newUnmodifiableFloatList(@Nullable float... aValues)
@Nonnull @ReturnsImmutableObject public static List<Integer> newUnmodifiableIntList(@Nullable int... aValues)
@Nonnull @ReturnsImmutableObject public static List<Long> newUnmodifiableLongList(@Nullable long... aValues)
@Nonnull @ReturnsImmutableObject public static List<Short> newUnmodifiableShortList(@Nullable short... aValues)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> NonBlockingStack<ELEMENTTYPE> newStack()
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> NonBlockingStack<ELEMENTTYPE> newStack(@Nullable ELEMENTTYPE aValue)
ELEMENTTYPE - The type of elements contained in the stack.aValue - The value to push. Maybe null.null stack.@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> NonBlockingStack<ELEMENTTYPE> newStack(@Nullable ELEMENTTYPE... aValues)
ELEMENTTYPE - The type of elements contained in the stack.aValues - The values that are to be pushed on the stack. The last element will
be the top element on the stack. May not be null .null stack object.@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> NonBlockingStack<ELEMENTTYPE> newStack(@Nullable Collection<? extends ELEMENTTYPE> aValues)
ELEMENTTYPE - The type of elements contained in the stack.aValues - The values that are to be pushed on the stack. The last element will
be the top element on the stack. May not be null .null stack object.@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Queue<ELEMENTTYPE> newQueue()
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Queue<ELEMENTTYPE> newQueue(@Nonnull ELEMENTTYPE aValue)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Queue<ELEMENTTYPE> newQueue(@Nullable ELEMENTTYPE... aValues)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Queue<ELEMENTTYPE> newQueue(@Nullable Enumeration<? extends ELEMENTTYPE> aEnum)
Collections.list(Enumeration) this method is more
flexible in Generics parameter.ELEMENTTYPE - Type of the elementsaEnum - The enumeration to be convertednull created PriorityQueue.Collections.list(Enumeration)@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Queue<ELEMENTTYPE> newQueue(@Nullable Iterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Queue<ELEMENTTYPE> newQueue(@Nullable Iterable<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Queue<ELEMENTTYPE> newQueue(@Nullable Collection<? extends ELEMENTTYPE> aCont)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Queue<ELEMENTTYPE> newQueue(@Nullable IIterableIterator<? extends ELEMENTTYPE> aIter)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> List<ELEMENTTYPE> getSorted(@Nullable IIterableIterator<? extends ELEMENTTYPE> aIter)
ELEMENTTYPE - The type of elements to iterate. May not be null.aIter - Input iterator. May be null.ArrayList based on the results of
Collections.sort(List).@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> List<ELEMENTTYPE> getSorted(@Nullable IIterableIterator<? extends ELEMENTTYPE> aIter, @Nonnull Comparator<? super ELEMENTTYPE> aComparator)
ELEMENTTYPE - The type of elements to iterate. May not be null.aIter - Input iterator. May be null.aComparator - The comparator to use. May not be null.ArrayList based on the results of
Collections.sort(List).@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> List<ELEMENTTYPE> getSorted(@Nullable Iterator<? extends ELEMENTTYPE> aIter)
ELEMENTTYPE - The type of elements to iterate. May not be null.aIter - Input iterator. May not be null.ArrayList based on the results of
Collections.sort(List).@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> List<ELEMENTTYPE> getSorted(@Nullable Iterator<? extends ELEMENTTYPE> aIter, @Nonnull Comparator<? super ELEMENTTYPE> aComparator)
ELEMENTTYPE - The type of elements to iterate.aIter - Input iterator. May be null.aComparator - The comparator to use. May not be null.ArrayList based on the results of
Collections.sort(List, Comparator).@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> List<ELEMENTTYPE> getSorted(@Nullable Iterable<? extends ELEMENTTYPE> aCont)
ELEMENTTYPE - The type of element to iterate.aCont - Iterable input object. May be null.ArrayList based on the results of
Collections.sort(List).@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> List<ELEMENTTYPE> getSorted(@Nullable Iterable<? extends ELEMENTTYPE> aCont, @Nonnull Comparator<? super ELEMENTTYPE> aComparator)
ELEMENTTYPE - The type of element to iterate.aCont - Iterable input object. May be null.aComparator - The comparator to use. May not be null.ArrayList based on the results of
Collections.sort(List, Comparator).@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> List<ELEMENTTYPE> getSorted(@Nullable Collection<? extends ELEMENTTYPE> aCont)
ELEMENTTYPE - The type of element to iterate.aCont - Collection input object. May be null.ArrayList based on the results of
Collections.sort(List).@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> List<ELEMENTTYPE> getSorted(@Nullable Collection<? extends ELEMENTTYPE> aCont, @Nonnull Comparator<? super ELEMENTTYPE> aComparator)
ELEMENTTYPE - The type of element to iterate.aCont - Collection input object. May be null.aComparator - The comparator to use. May not be null.ArrayList based on the results of
Collections.sort(List, Comparator).@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> List<ELEMENTTYPE> getSorted(@Nullable ELEMENTTYPE... aCont)
ELEMENTTYPE - The type of element to iterate.aCont - Array input object. May be null.ArrayList based on the results of
Collections.sort(List).@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> List<ELEMENTTYPE> getSorted(@Nullable ELEMENTTYPE[] aCont, @Nonnull Comparator<? super ELEMENTTYPE> aComparator)
ELEMENTTYPE - The type of element to iterate.aCont - Iterable input object. May be null.aComparator - The comparator to use. May not be null.ArrayList based on the results of
Collections.sort(List, Comparator).@Nullable @ReturnsMutableObject(value="design") public static <ELEMENTTYPE extends Comparable<? super ELEMENTTYPE>> List<ELEMENTTYPE> getSortedInline(@Nullable List<ELEMENTTYPE> aList)
@Nullable @ReturnsMutableObject(value="design") public static <ELEMENTTYPE> List<ELEMENTTYPE> getSortedInline(@Nullable List<ELEMENTTYPE> aList, @Nonnull Comparator<? super ELEMENTTYPE> aComparator)
@Nullable public static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> Map<KEYTYPE,VALUETYPE> getSortedByKey(@Nullable Map<KEYTYPE,VALUETYPE> aMap)
Comparable interface.KEYTYPE - map key typeVALUETYPE - map value typeaMap - the map to sort@Nullable public static <KEYTYPE extends Comparable<? super KEYTYPE>,VALUETYPE> Map<KEYTYPE,VALUETYPE> getSortedByKey(@Nullable Map<KEYTYPE,VALUETYPE> aMap, @Nonnull ESortOrder eSortOrder)
Comparable interface.KEYTYPE - map key typeVALUETYPE - map value typeaMap - the map to sorteSortOrder - The sort oder to use for sorting. May not be null.@Nullable public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> getSortedByKey(@Nullable Map<KEYTYPE,VALUETYPE> aMap, @Nonnull Comparator<? super KEYTYPE> aKeyComparator)
KEYTYPE - map key typeVALUETYPE - map value typeaMap - The map to sort. May not be null.aKeyComparator - The comparator to be used. May not be null.@Nullable public static <KEYTYPE,VALUETYPE extends Comparable<? super VALUETYPE>> Map<KEYTYPE,VALUETYPE> getSortedByValue(@Nullable Map<KEYTYPE,VALUETYPE> aMap)
Comparable interface.KEYTYPE - map key typeVALUETYPE - map value typeaMap - The map to sort. May not be null.@Nullable public static <KEYTYPE,VALUETYPE extends Comparable<? super VALUETYPE>> Map<KEYTYPE,VALUETYPE> getSortedByValue(@Nullable Map<KEYTYPE,VALUETYPE> aMap, @Nonnull ESortOrder eSortOrder)
Comparable interface.KEYTYPE - map key typeVALUETYPE - map value typeaMap - The map to sort. May not be null.eSortOrder - The sort order to be applied. May not be null.@Nullable public static <KEYTYPE,VALUETYPE> Map<KEYTYPE,VALUETYPE> getSortedByValue(@Nullable Map<KEYTYPE,VALUETYPE> aMap, @Nonnull Comparator<? super VALUETYPE> aValueComparator)
KEYTYPE - map key typeVALUETYPE - map value typeaMap - The map to sort. May not be null.aValueComparator - The comparator to be used. May not be null.@Nullable @ReturnsMutableCopy public static <ELEMENTTYPE> List<ELEMENTTYPE> getReverseList(@Nullable Collection<? extends ELEMENTTYPE> aCollection)
@Nullable @ReturnsMutableObject(value="semantics of this method") public static <ELEMENTTYPE> List<ELEMENTTYPE> getReverseInlineList(@Nullable List<ELEMENTTYPE> aList)
@Nonnull public static <ELEMENTTYPE> IIterableIterator<ELEMENTTYPE> getIterator(@Nullable Enumeration<? extends ELEMENTTYPE> aEnum)
@Nonnull public static <ELEMENTTYPE> Iterator<ELEMENTTYPE> getIterator(@Nullable Iterable<ELEMENTTYPE> aCont)
@Nonnull public static <ELEMENTTYPE> Iterator<ELEMENTTYPE> getIterator(@Nullable Iterator<ELEMENTTYPE> aIter)
@Nonnull public static <ELEMENTTYPE> Iterator<ELEMENTTYPE> getIterator(@Nullable ELEMENTTYPE... aArray)
@Nonnull public static <ELEMENTTYPE> Iterator<ELEMENTTYPE> getReverseIterator(@Nullable List<? extends ELEMENTTYPE> aCont)
@Nonnull public static <ELEMENTTYPE> Iterator<ELEMENTTYPE> getEmptyIterator()
ELEMENTTYPE - The type the iterator's elements.null object.@Nonnull public static <ELEMENTTYPE> Iterator<ELEMENTTYPE> getCombinedIterator(@Nullable Iterator<? extends ELEMENTTYPE> aIter1, @Nullable Iterator<? extends ELEMENTTYPE> aIter2)
ELEMENTTYPE - The type of elements to be enumerated.aIter1 - First iterator. May be null.aIter2 - Second iterator. May be null.null.@Nonnull public static <ELEMENTTYPE> Enumeration<ELEMENTTYPE> getEnumeration(@Nullable Iterable<ELEMENTTYPE> aCont)
Enumeration object based on a Collection object.ELEMENTTYPE - the type of the elements in the containeraCont - The container to enumerate.@Nonnull public static <ELEMENTTYPE> Enumeration<ELEMENTTYPE> getEnumeration(@Nullable ELEMENTTYPE... aArray)
Enumeration object based on the passed array.ELEMENTTYPE - the type of the elements in the containeraArray - The array to enumerate.@Nonnull public static <ELEMENTTYPE> Enumeration<ELEMENTTYPE> getEnumeration(@Nullable Iterator<ELEMENTTYPE> aIter)
ELEMENTTYPE - the type of the elements in the containeraIter - iterator object to use@Nonnull public static <KEYTYPE,VALUETYPE> Enumeration<Map.Entry<KEYTYPE,VALUETYPE>> getEnumeration(@Nullable Map<KEYTYPE,VALUETYPE> aMap)
KEYTYPE - map key typeVALUETYPE - map value typeaMap - map object to use@Nonnull public static <ELEMENTTYPE> Enumeration<ELEMENTTYPE> getEmptyEnumeration()
ELEMENTTYPE - The type the enumeration's elements.null object.@Nullable @ReturnsMutableCopy public static <ELEMENTTYPE> NonBlockingStack<ELEMENTTYPE> getStackCopyWithoutTop(@Nullable NonBlockingStack<ELEMENTTYPE> aStack)
@Nullable @ReturnsMutableCopy public static <KEY,VALUE> Map<KEY,VALUE> getFilteredMap(@Nullable Map<KEY,VALUE> aValues, @Nullable Collection<KEY> aKeys)
KEY - Source map key type.VALUE - Source map value type.aValues - Source map to filter. May not be null.aKeys - The filter set to filter the entries from. May not be
null.null map containing only the elements from the
specified key set.@Nullable public static <ELEMENTTYPE> ELEMENTTYPE getFirstElement(@Nullable List<ELEMENTTYPE> aList)
ELEMENTTYPE - List element typeaList - The list. May be null.null if the list is null or empty, the
first element otherwise.@Nullable public static <ELEMENTTYPE> ELEMENTTYPE getFirstElement(@Nullable SortedSet<ELEMENTTYPE> aSortedSet)
ELEMENTTYPE - Set element typeaSortedSet - The sorted set. May be null.null if the list is null or empty, the
first element otherwise.@Nullable public static <ELEMENTTYPE> ELEMENTTYPE getFirstElement(@Nullable Collection<ELEMENTTYPE> aCollection)
ELEMENTTYPE - Collection element typeaCollection - The collection. May be null.null if the collection is null or empty,
the first element otherwise.@Nullable public static <ELEMENTTYPE> ELEMENTTYPE getFirstElement(@Nullable Iterable<ELEMENTTYPE> aIterable)
ELEMENTTYPE - Iterable element typeaIterable - The iterable. May be null.null if the iterable is null or empty,
the first element otherwise.@Nullable public static <KEYTYPE,VALUETYPE> Map.Entry<KEYTYPE,VALUETYPE> getFirstElement(@Nullable Map<KEYTYPE,VALUETYPE> aMap)
KEYTYPE - Map key typeVALUETYPE - Map value typeaMap - The map. May be null.null if the map is null or empty, the
first element otherwise.@Nullable public static <KEYTYPE,VALUETYPE> KEYTYPE getFirstKey(@Nullable Map<KEYTYPE,VALUETYPE> aMap)
KEYTYPE - Map key typeVALUETYPE - Map value typeaMap - The map. May be null.null if the map is null or empty, the
first key otherwise.@Nullable public static <KEYTYPE,VALUETYPE> KEYTYPE getFirstKey(@Nullable SortedMap<KEYTYPE,VALUETYPE> aSortedMap)
KEYTYPE - Map key typeVALUETYPE - Map value typeaSortedMap - The sorted map. May be null.null if the map is null or empty, the
first key otherwise.@Nullable public static <KEYTYPE,VALUETYPE> VALUETYPE getFirstValue(@Nullable Map<KEYTYPE,VALUETYPE> aMap)
KEYTYPE - Map key typeVALUETYPE - Map value typeaMap - The map. May be null.null if the map is null or empty, the
first value otherwise.@Nullable public static <KEYTYPE,VALUETYPE> VALUETYPE getFirstValue(@Nullable SortedMap<KEYTYPE,VALUETYPE> aSortedMap)
KEYTYPE - Map key typeVALUETYPE - Map value typeaSortedMap - The map. May be null.null if the map is null or empty, the
first value otherwise.@Nullable public static <ELEMENTTYPE> ELEMENTTYPE removeFirstElement(@Nullable List<ELEMENTTYPE> aList)
@Nullable public static <ELEMENTTYPE> ELEMENTTYPE getLastElement(@Nullable List<ELEMENTTYPE> aList)
@Nullable public static <ELEMENTTYPE> ELEMENTTYPE getLastElement(@Nullable SortedSet<ELEMENTTYPE> aSortedSet)
@Nullable public static <ELEMENTTYPE> ELEMENTTYPE getLastElement(@Nullable Collection<ELEMENTTYPE> aCollection)
@Nullable public static <ELEMENTTYPE> ELEMENTTYPE getLastElement(@Nullable Iterable<ELEMENTTYPE> aIterable)
@Nonnull public static EChange removeElementAtIndex(@Nullable List<?> aList, int nIndex)
null and the index is ≥ 0 and <
list.size()aList - The list to remove an element from. May be null.nIndex - The index to be removed. May be arbitrary.EChange.CHANGED if removal was successfulremoveAndReturnElementAtIndex(List, int)@Nullable public static <ELEMENTTYPE> ELEMENTTYPE removeAndReturnElementAtIndex(@Nullable List<ELEMENTTYPE> aList, int nIndex)
null and the index is ≥ 0 and <
list.size()ELEMENTTYPE - List element typeaList - The list to remove an element from. May be null.nIndex - The index to be removed. May be arbitrary.null if removal failed or the removed element. Note:
the removed element may also be null so it may be
tricky to determine if removal succeeded or not!removeElementAtIndex(List, int)@Nullable public static <KEYTYPE,VALUETYPE> KEYTYPE getLastKey(@Nullable SortedMap<KEYTYPE,VALUETYPE> aSortedMap)
KEYTYPE - Map key typeVALUETYPE - Map value typeaSortedMap - The sorted map. May be null.null if the map is null or empty, the
last key otherwise.@Nullable public static <KEYTYPE,VALUETYPE> VALUETYPE getLastValue(@Nullable SortedMap<KEYTYPE,VALUETYPE> aSortedMap)
KEYTYPE - Map key typeVALUETYPE - Map value typeaSortedMap - The map. May be null.null if the map is null or empty, the
last value otherwise.@Nullable public static <ELEMENTTYPE> ELEMENTTYPE removeLastElement(@Nullable List<ELEMENTTYPE> aList)
public static boolean isEmpty(@Nullable IIterableIterator<?> aIter)
public static boolean isEmpty(@Nullable Enumeration<?> aEnum)
public static boolean isEmpty(@Nullable Collection<?> aCont)
public static boolean isNotEmpty(@Nullable IIterableIterator<?> aIter)
public static boolean isNotEmpty(@Nullable Enumeration<?> aEnum)
public static boolean isNotEmpty(@Nullable Collection<?> aCont)
@Nonnegative public static int getSize(@Nullable Collection<?> aCollection)
Collection. This method handles
null containers.aCollection - Object to check. May be null.null.@Nonnegative public static int getSize(@Nullable Map<?,?> aMap)
Map. This method handles
null containers.aMap - Object to check. May be null.null.@Nonnegative public static int getSize(@Nullable Iterable<?> aIterable)
Iterable.aIterable - Iterator to check. May be null.null.@Nonnegative public static int getSize(@Nullable IIterableIterator<?> aIterator)
Iterable.aIterator - Iterable iterator to check. May be null.null.@Nonnegative public static int getSize(@Nullable Iterator<?> aIterator)
Iterator.aIterator - Iterator to check. May be null.null.@Nonnegative public static int getSize(@Nullable Enumeration<?> aEnumeration)
Enumeration.aEnumeration - Enumeration to check. May be null.null.@Nullable @ReturnsMutableCopy public static <ELEMENTTYPE> List<ELEMENTTYPE> getConcatenatedList(@Nullable Collection<? extends ELEMENTTYPE> aCollection1, @Nullable Collection<? extends ELEMENTTYPE> aCollection2)
@Nullable @ReturnsMutableCopy public static <ELEMENTTYPE> List<ELEMENTTYPE> getConcatenatedList(@Nullable Collection<? extends ELEMENTTYPE> aCont1, @Nullable ELEMENTTYPE... aCont2)
@Nullable @ReturnsMutableCopy public static <ELEMENTTYPE> List<ELEMENTTYPE> getConcatenatedList(@Nullable ELEMENTTYPE[] aCont1, @Nullable Collection<? extends ELEMENTTYPE> aCont2)
@Nullable @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> getConcatenatedSet(@Nullable Collection<? extends ELEMENTTYPE> aCont1, @Nullable Collection<? extends ELEMENTTYPE> aCont2)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> getConcatenatedSet(@Nullable Collection<? extends ELEMENTTYPE> aCont1, @Nullable ELEMENTTYPE... aCont2)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Set<ELEMENTTYPE> getConcatenatedSet(@Nullable ELEMENTTYPE[] aCont1, @Nullable Collection<? extends ELEMENTTYPE> aCont2)
@Nonnull @ReturnsMutableObject(value="design") public static <ELEMENTTYPE,COLLTYPE extends Collection<? super ELEMENTTYPE>> COLLTYPE getConcatenatedInline(@Nonnull COLLTYPE aCont, @Nullable ELEMENTTYPE... aElementsToAdd)
@Nonnull @ReturnsMutableObject(value="design") public static <ELEMENTTYPE,COLLTYPE extends Collection<? super ELEMENTTYPE>> COLLTYPE getConcatenatedInline(@Nonnull COLLTYPE aCont, @Nullable Collection<? extends ELEMENTTYPE> aElementsToAdd)
@Nonnull @ReturnsMutableCopy public static <KEY,VALUE> Map<KEY,VALUE> getCombinedMap(@Nullable Map<KEY,VALUE> aMap1, @Nullable Map<KEY,VALUE> aMap2)
KEY - The map key type.VALUE - The map value type.aMap1 - The first map. May be null.aMap2 - The second map. May be null.null and always a new object. If both parameters
are not null a new map is created, initially
containing the entries from the first parameter, afterwards
extended by the parameters of the second map potentially
overwriting elements from the first map.@Nullable @ReturnsMutableCopy public static List<Boolean> newObjectListFromArray(@Nullable boolean[] aArray)
@Nullable @ReturnsMutableCopy public static List<Byte> newObjectListFromArray(@Nullable byte[] aArray)
@Nullable @ReturnsMutableCopy public static List<Character> newObjectListFromArray(@Nullable char[] aArray)
@Nullable @ReturnsMutableCopy public static List<Double> newObjectListFromArray(@Nullable double[] aArray)
@Nullable @ReturnsMutableCopy public static List<Float> newObjectListFromArray(@Nullable float[] aArray)
@Nullable @ReturnsMutableCopy public static List<Integer> newObjectListFromArray(@Nullable int[] aArray)
@Nullable @ReturnsMutableCopy public static List<Long> newObjectListFromArray(@Nullable long[] aArray)
@Nullable @ReturnsMutableCopy public static List<Short> newObjectListFromArray(@Nullable short[] aArray)
@Nullable @ReturnsMutableCopy public static List<?> newObjectListFromArray(@Nullable Object aValue, @Nonnull Class<?> aComponentType)
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> List<ELEMENTTYPE> getSubList(@Nullable List<ELEMENTTYPE> aCont, @Nonnegative int nStartIndex, @Nonnegative int nSectionLength)
ELEMENTTYPE - Type of elements in listaCont - The backing list. May not be null.nStartIndex - The start index to use. Needs to be ≥ 0.nSectionLength - the length of the desired subset. If list is shorter than that,
aIter will return a shorter sectionnull.@Nullable @ReturnsMutableCopy public static <KEYTYPE,VALUETYPE> Map<VALUETYPE,KEYTYPE> getSwappedKeyValues(@Nullable Map<KEYTYPE,VALUETYPE> aMap)
KEYTYPE - Original key type.VALUETYPE - Original value type.aMap - The input map to convert. May not be null.@Nullable @ReturnsMutableCopy public static <KEYTYPE,VALUETYPE> IMultiMapSetBased<VALUETYPE,KEYTYPE> getReverseLookupSet(@Nullable IMultiMap<KEYTYPE,VALUETYPE,? extends Collection<VALUETYPE>> aMap)
KEYTYPE - Original key typeVALUETYPE - Original value typeaMap - The input map to convert. May not be nullIMultiMapSetBased@Nullable @ReturnsMutableCopy public static <KEYTYPE,VALUETYPE> IMultiMapSetBased<VALUETYPE,KEYTYPE> getReverseLookup(@Nullable IMultiMapSetBased<KEYTYPE,VALUETYPE> aMap)
KEYTYPE - Original key typeVALUETYPE - Original value typeaMap - The input map to convert. May not be nullHashMap@Nullable public static <ELEMENTTYPE> ELEMENTTYPE getSafe(@Nullable List<ELEMENTTYPE> aList, int nIndex)
ELEMENTTYPE - The type of elements on the list.aList - The list to extract from. May be null.nIndex - The index to access. Should be ≥ 0.null if the element cannot be accessed.@Nullable public static <ELEMENTTYPE> ELEMENTTYPE getSafe(@Nullable List<ELEMENTTYPE> aList, int nIndex, @Nullable ELEMENTTYPE aDefault)
ELEMENTTYPE - The type of elements on the list.aList - The list to extract from. May be null.nIndex - The index to access. Should be ≥ 0.aDefault - The value to be returned, if the index is out of bounds.public static boolean containsAnyNullElement(@Nullable Iterable<?> aCont)
null
element.aCont - The collection to check. May be null.true only if the passed collection is neither
null nor empty and if at least one null
element is contained.public static boolean containsOnlyNullElements(@Nullable Iterable<?> aCont)
null element.aCont - The collection to check. May be null.true only if the passed collection is neither
null nor empty and if at least one null
element is contained.Copyright © 2014–2015 Philip Helger. All rights reserved.