public class CollUtils extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> void |
addAll(Collection<T> collection,
Collection<T> elements) |
static <T> void |
addAll(Collection<T> collection,
T... elements) |
static <T> T |
getLast(Iterable<T> collection) |
static <T> boolean |
isContainsAll(T[] sources,
T... elements) |
static <T> boolean |
isContainsAny(T[] sources,
T element) |
static boolean |
isEmpty(Collection<?> collection) |
static boolean |
isEmpty(Map<?,?> map) |
static <T> boolean |
isEmpty(T[] array) |
static boolean |
isNotEmpty(Collection<?> collection) |
static boolean |
isNotEmpty(Map<?,?> map) |
static <T> boolean |
isNotEmpty(T[] array) |
static <T> List<T> |
newArrayList(T... elements) |
static <T> Set<T> |
newHashSet(T... elements) |
static <T> Set<T> |
newLinkedHashSet(T... elements) |
static <T> Deque<T> |
newLinkedList(T... elements) |
static <T,R> List<R> |
toList(Collection<T> collection,
Function<T,R> mapping) |
static <T,R> Set<R> |
toSet(Collection<T> collection,
Function<T,R> mapping) |
public static boolean isEmpty(Collection<?> collection)
public static boolean isNotEmpty(Collection<?> collection)
@SafeVarargs public static <T> void addAll(Collection<T> collection, T... elements)
public static <T> void addAll(Collection<T> collection, Collection<T> elements)
@SafeVarargs public static <T> Deque<T> newLinkedList(T... elements)
@SafeVarargs public static <T> List<T> newArrayList(T... elements)
@SafeVarargs public static <T> Set<T> newLinkedHashSet(T... elements)
@SafeVarargs public static <T> Set<T> newHashSet(T... elements)
public static <T> T getLast(Iterable<T> collection)
public static <T,R> List<R> toList(Collection<T> collection, Function<T,R> mapping)
public static <T,R> Set<R> toSet(Collection<T> collection, Function<T,R> mapping)
public static <T> boolean isEmpty(T[] array)
public static <T> boolean isNotEmpty(T[] array)
@SafeVarargs public static <T> boolean isContainsAll(T[] sources, T... elements)
public static <T> boolean isContainsAny(T[] sources,
T element)
public static boolean isEmpty(Map<?,?> map)
public static boolean isNotEmpty(Map<?,?> map)
Copyright © 2022. All rights reserved.