Package org.optaplanner.core.impl.util
Class CollectionUtils
- java.lang.Object
-
- org.optaplanner.core.impl.util.CollectionUtils
-
public final class CollectionUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> List<T>
concat(List<T> left, List<T> right)
static <E> List<E>
copy(List<E> originalList, boolean reverse)
Creates a copy of the list, optionally in reverse order.
-
-
-
Method Detail
-
copy
public static <E> List<E> copy(List<E> originalList, boolean reverse)
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, preferablyArrayList
reverse
- true if the resulting list should have its order reversed- Returns:
- mutable list, never null
-
-