|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.assertj.core.util.Collections
public final class Collections
Utility methods related to Collections.
| Method Summary | ||
|---|---|---|
static
|
duplicatesFrom(Collection<T> c)
Returns any duplicate elements from the given Collection. |
|
static String |
format(Collection<?> c)
Returns the String standard representation of
the given Collection, or null if the given Collection is null. |
|
static String |
format(Collection<?> c,
String start,
String end)
Returns the String standard representation of
the given Collection, or null if the given Collection is null. |
|
static String |
format(Representation p,
Collection<?> c)
Returns the String representation of the given Collection, or null if the given
Collection is null. |
|
static String |
format(Representation p,
Collection<?> c,
String start,
String end)
Returns the String representation of the given Collection, or null if the given
Collection is null. |
|
static boolean |
isNullOrEmpty(Collection<?> c)
Indicates whether the given Collection is null or empty. |
|
static
|
nonNullElementsIn(Collection<T> c)
Returns all the non- null elements in the given Collection. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> Collection<T> duplicatesFrom(Collection<T> c)
Collection.
T - the generic type of the given Collection.c - the given Collection that might have duplicate elements.
Collection containing the duplicate elements of the given one. If no duplicates are found, an
empty Collection is returned.public static boolean isNullOrEmpty(Collection<?> c)
Collection is null or empty.
c - the given Collection.
true if the given Collection is null or empty, otherwise false.public static String format(Collection<?> c)
String standard representation of
the given Collection, or null if the given Collection is null.
c - the Collection to format.
String representation of the given Collection.
public static String format(Representation p,
Collection<?> c)
String representation of the given Collection, or null if the given
Collection is null.
p - c - the Collection to format.
String representation of the given Collection.
public static String format(Collection<?> c,
String start,
String end)
String standard representation of
the given Collection, or null if the given Collection is null.
c - the Collection to format.
String representation of the given Collection.
public static String format(Representation p,
Collection<?> c,
String start,
String end)
String representation of the given Collection, or null if the given
Collection is null.
p - c - the Collection to format.
String representation of the given Collection.public static <T> List<T> nonNullElementsIn(Collection<T> c)
null elements in the given Collection.
T - the type of elements of the Collection.c - the given Collection.
null elements in the given Collection. An empty list is returned if the given
Collection is null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||