Class CollectionUtils
java.lang.Object
ai.timefold.solver.core.impl.util.CollectionUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T>static <E> List<E>Creates a copy of the list, optionally in reverse order.static <K,V> Map<K, V> newHashMap(int size) static <T> Set<T>newHashSet(int size) static <K,V> Map<K, V> newIdentityHashMap(int size) static <K,V> Map<K, V> newLinkedHashMap(int size) static <T> Set<T>newLinkedHashSet(int size) static <T> List<T>toDistinctList(Collection<T> collection)
-
Method Details
-
copy
Creates a copy of the list, optionally in reverse order.- Type Parameters:
E- the type of elements in the list- Parameters:
originalList- the list to copy, preferablyArrayListreverse- true if the resulting list should have its order reversed- Returns:
- mutable list, never null
-
concat
-
toDistinctList
-
newHashSet
-
newLinkedHashSet
-
newHashMap
-
newIdentityHashMap
-
newLinkedHashMap
-