Class CompoundList


  • public class CompoundList
    extends java.lang.Object
    Creates a list representation of two lists as a single, compound list.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private CompoundList()
      A compound list cannot be created.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <S> java.util.List<S> of​(java.util.List<? extends S> left, java.util.List<? extends S> right)
      Creates a list of a left and right list.
      static <S> java.util.List<S> of​(java.util.List<? extends S> left, java.util.List<? extends S> middle, java.util.List<? extends S> right)
      Creates a list of a left, a middle and a right list.
      static <S> java.util.List<S> of​(java.util.List<? extends S> left, S right)
      Creates a list of a list and an element.
      static <S> java.util.List<S> of​(S left, java.util.List<? extends S> right)
      Creates a list of a single element and another list.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CompoundList

        private CompoundList()
        A compound list cannot be created.
    • Method Detail

      • of

        public static <S> java.util.List<S> of​(S left,
                                               java.util.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> java.util.List<S> of​(java.util.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> java.util.List<S> of​(java.util.List<? extends S> left,
                                               java.util.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> java.util.List<S> of​(java.util.List<? extends S> left,
                                               java.util.List<? extends S> middle,
                                               java.util.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.