public final class CollectionUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static <T> java.util.List<T> |
add(java.util.List<T> list,
T element) |
static <T> java.util.Set<T> |
add(java.util.Set<T> set,
T element) |
static <T> java.util.Set<T> |
addSorted(java.util.Set<T> set,
T element) |
static <T> java.util.List<T> |
copyOf(java.util.List<T> list) |
static <K,V> java.util.Map<K,V> |
copyOf(java.util.Map<K,V> map) |
static <T> java.util.Set<T> |
copyOf(java.util.Set<T> set) |
static <T> java.util.Set<T> |
copyOfSorted(java.util.Set<T> set) |
static boolean |
isUnmodifiableType(java.lang.Class<?> clazz)
Returns true if the type is a known unmodifiable type.
|
static <T> java.util.List<java.util.List<T>> |
partition(java.util.List<T> list,
int batchSize) |
static <K,V> java.util.Map<K,V> |
put(java.util.Map<K,V> map,
K key,
V value) |
static <T> java.util.Set<T> |
removeSorted(java.util.Set<T> set,
T element) |
static <T> java.util.List<T> |
unmodifiableList(java.util.List<T> list)
Return an unmodifiable copy of a list, or the same list if its already an unmodifiable type.
|
static <T> java.util.Set<T> |
unmodifiableSet(java.util.Set<T> set)
Return an unmodifiable copy of a set, or the same set if its already an unmodifiable type.
|
public static boolean isUnmodifiableType(java.lang.Class<?> clazz)
clazz
- the typepublic static <T> java.util.List<T> unmodifiableList(java.util.List<T> list)
T
- element typelist
- the listpublic static <T> java.util.Set<T> unmodifiableSet(java.util.Set<T> set)
T
- element typeset
- the setpublic static <T> java.util.List<java.util.List<T>> partition(java.util.List<T> list, int batchSize)
public static <T> java.util.List<T> add(java.util.List<T> list, T element)
public static <T> java.util.List<T> copyOf(java.util.List<T> list)
public static <T> java.util.Set<T> add(java.util.Set<T> set, T element)
public static <T> java.util.Set<T> copyOf(java.util.Set<T> set)
public static <T> java.util.Set<T> addSorted(java.util.Set<T> set, T element)
public static <T> java.util.Set<T> removeSorted(java.util.Set<T> set, T element)
public static <T> java.util.Set<T> copyOfSorted(java.util.Set<T> set)
public static <K,V> java.util.Map<K,V> put(java.util.Map<K,V> map, K key, V value)
public static <K,V> java.util.Map<K,V> copyOf(java.util.Map<K,V> map)
Copyright © 2007–2021 Querydsl. All rights reserved.