Class CollectionsTool

    • Constructor Detail

      • CollectionsTool

        public CollectionsTool()
        Deprecated.
    • Method Detail

      • reverse

        public <E> boolean reverse​(List<E> input)
        Deprecated.
        Reverse the order of the elements within a list, so that the last element is moved to the beginning of the list, the next-to-last element to the second position, and so on. The input list is modified in place, so this operation will succeed only if the list is modifiable.
        Type Parameters:
        E - the type of the elements in the list
        Parameters:
        input - the list to reverse
        Returns:
        true if the list was successfully reversed, false otherwise
      • sort

        public <E extends Comparable<E>> boolean sort​(List<E> input)
        Deprecated.
        Sort the elements within a list according to their natural order. The input list is modified in place, so this operation will succeed only if the list is modifiable.
        Type Parameters:
        E - the type of the elements in the list
        Parameters:
        input - the list to sort
        Returns:
        true if the list was successfully sorted, false otherwise