| Constructor and Description |
|---|
CollectionExt() |
| Modifier and Type | Method and Description |
|---|---|
static <Type> boolean |
any(java.util.Collection<Type> coll)
Returns whether there are any elements in
coll, which can be null. |
static <Type> boolean |
contains(java.util.Collection<Type> coll,
Type val)
Returns whether the collection (if not null) contains the given value.
|
static <Type> boolean |
hasAll(java.util.Collection<Type> src,
java.util.Collection<Type> tgt)
Returns whether all elements in
tgt are in src. |
static <Type> boolean |
hasAny(java.util.Collection<Type> src,
java.util.Collection<Type> tgt)
Returns whether any element in
tgt is in src. |
static <Type> java.util.Set<Type> |
intersection(java.util.Collection<Type>... colls)
Returns a list of the elements in common.
|
static <Type> java.util.Set<Type> |
intersection(java.util.Collection<Type> a,
java.util.Collection<Type> b)
Returns a list of the elements in common.
|
public static <Type> java.util.Set<Type> intersection(java.util.Collection<Type> a,
java.util.Collection<Type> b)
@SafeVarargs public static <Type> java.util.Set<Type> intersection(java.util.Collection<Type>... colls)
public static <Type> boolean contains(java.util.Collection<Type> coll,
Type val)
coll is null.public static <Type> boolean hasAll(java.util.Collection<Type> src,
java.util.Collection<Type> tgt)
tgt are in src.
If src or tgt is null, false is returned.public static <Type> boolean hasAny(java.util.Collection<Type> src,
java.util.Collection<Type> tgt)
tgt is in src.
If src or tgt is null, false is returned.public static <Type> boolean any(java.util.Collection<Type> coll)
coll, which can be null.