Package com.querydsl.core.util
Class CollectionUtils
java.lang.Object
com.querydsl.core.util.CollectionUtils
CollectionUtils provides addition operations for Collection types that provide an immutable type
for single item collections and after that mutable instances
- Author:
- tiwe
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T>static <T> Set<T>static <T> Set<T>static <T> List<T>static <K,V> Map<K, V> static <T> Set<T>static <T> Set<T>copyOfSorted(Set<T> set) static booleanisUnmodifiableType(Class<?> clazz) Returns true if the type is a known unmodifiable type.static <K,V> Map<K, V> static <T> Set<T>removeSorted(Set<T> set, T element) static <T> List<T>unmodifiableList(List<T> list) Return an unmodifiable copy of a list, or the same list if its already an unmodifiable type.static <T> Set<T>unmodifiableSet(Set<T> set) Return an unmodifiable copy of a set, or the same set if its already an unmodifiable type.
-
Method Details
-
isUnmodifiableType
Returns true if the type is a known unmodifiable type.- Parameters:
clazz- the type- Returns:
- true if the type is a known unmodifiable type
-
unmodifiableList
Return an unmodifiable copy of a list, or the same list if its already an unmodifiable type.- Type Parameters:
T- element type- Parameters:
list- the list- Returns:
- unmodifiable copy of a list, or the same list if its already an unmodifiable type
-
unmodifiableSet
Return an unmodifiable copy of a set, or the same set if its already an unmodifiable type.- Type Parameters:
T- element type- Parameters:
set- the set- Returns:
- unmodifiable copy of a set, or the same set if its already an unmodifiable type
-
partition
-
add
-
copyOf
-
add
-
copyOf
-
addSorted
-
removeSorted
-
copyOfSorted
-
put
-
copyOf
-