|
ProgramixGenericLib v5.0.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.programix.collections.CollectionsTools
public class CollectionsTools
Utility methods for working with the Collections API. Unless otherwise stated, these methods are not thread-safe.
ReverseComparator,
ComparableComparator,
NullFirstComparator,
NullLastComparator| Field Summary | |
|---|---|
static Comparator<Comparable<?>> |
NULL_FIRST_COMPARABLE_ASC
This Comparator sorts Comparable objects in their
normal ordering, but with any null's
that may be present sorted to the top. |
static Comparator<Comparable<?>> |
NULL_FIRST_COMPARABLE_DESC
This Comparator sorts Comparable objects in their
reverse ordering, but with any null's
that may be present sorted to the top. |
static Comparator<Comparable<?>> |
NULL_LAST_COMPARABLE_ASC
This Comparator sorts Comparable objects in their
normal ordering, but with any null's
that may be present sorted to the bottom. |
static Comparator<Comparable<?>> |
NULL_LAST_COMPARABLE_DESC
This Comparator sorts Comparable objects in their
reverse ordering, but with any null's
that may be present sorted to the bottom. |
| Method Summary | |
|---|---|
static boolean |
isEmpty(Collection<?> collection)
Returns true if the passed reference is null or if the size of the collection is 0. |
static boolean |
isNotEmpty(Collection<?> collection)
Returns true if the passed reference is not null and the size of the collection greater than 0. |
static char[] |
toCharArray(Collection<Character> charList)
Converts a Collection holding instances of Character into a char[]. |
static int[] |
toIntArray(Collection<? extends Number> integerList)
Converts a collection of Number to an int[]. |
static String[] |
toStringArray(Collection<String> strings)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Comparator<Comparable<?>> NULL_FIRST_COMPARABLE_ASC
Comparator sorts Comparable objects in their
normal ordering, but with any null's
that may be present sorted to the top.
NullFirstComparator,
NullLastComparator,
ReverseComparator,
ComparableComparatorpublic static final Comparator<Comparable<?>> NULL_FIRST_COMPARABLE_DESC
Comparator sorts Comparable objects in their
reverse ordering, but with any null's
that may be present sorted to the top.
NullFirstComparator,
NullLastComparator,
ReverseComparator,
ComparableComparatorpublic static final Comparator<Comparable<?>> NULL_LAST_COMPARABLE_ASC
Comparator sorts Comparable objects in their
normal ordering, but with any null's
that may be present sorted to the bottom.
NullFirstComparator,
NullLastComparator,
ReverseComparator,
ComparableComparatorpublic static final Comparator<Comparable<?>> NULL_LAST_COMPARABLE_DESC
Comparator sorts Comparable objects in their
reverse ordering, but with any null's
that may be present sorted to the bottom.
NullFirstComparator,
NullLastComparator,
ReverseComparator,
ComparableComparator| Method Detail |
|---|
public static String[] toStringArray(Collection<String> strings)
public static int[] toIntArray(Collection<? extends Number> integerList)
Number to an int[].
public static char[] toCharArray(Collection<Character> charList)
Character into a char[].
public static boolean isEmpty(Collection<?> collection)
public static boolean isNotEmpty(Collection<?> collection)
|
ProgramixGenericLib v5.0.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||