Class CollectionUtils


  • public final class CollectionUtils
    extends Object
    • 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, 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)