Class CollectionUtils

java.lang.Object
org.optaplanner.core.impl.util.CollectionUtils

public final class CollectionUtils extends Object
  • Method Details

    • 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, preferably ArrayList
      reverse - true if the resulting list should have its order reversed
      Returns:
      mutable list, never null
    • concat

      public static <T> List<T> concat(List<T> left, List<T> right)