Class CompoundList


  • public class CompoundList
    extends Object
    Creates a list representation of two lists as a single, compound list.
    • Method Detail

      • of

        public static <S> List<S> of​(S left,
                                     List<? extends S> right)
        Creates a list of a single element and another list.
        Type Parameters:
        S - The type of the list's elements.
        Parameters:
        left - The left element.
        right - The right list.
        Returns:
        A compound list representing the element and the list.
      • of

        public static <S> List<S> of​(List<? extends S> left,
                                     S right)
        Creates a list of a list and an element.
        Type Parameters:
        S - The type of the list's elements.
        Parameters:
        left - The left left.
        right - The right element.
        Returns:
        A compound list representing the element and the list.
      • of

        public static <S> List<S> of​(List<? extends S> left,
                                     List<? extends S> right)
        Creates a list of a left and right list.
        Type Parameters:
        S - The type of the list's elements.
        Parameters:
        left - The left list.
        right - The right list.
        Returns:
        A compound list representing the elements of both lists.
      • of

        public static <S> List<S> of​(List<? extends S> left,
                                     List<? extends S> middle,
                                     List<? extends S> right)
        Creates a list of a left, a middle and a right list.
        Type Parameters:
        S - The type of the list's elements.
        Parameters:
        left - The left list.
        middle - The middle list.
        right - The right list.
        Returns:
        A compound list representing the elements of all lists.