Class Tuple11<A,​B,​C,​D,​E,​F,​G,​H,​I,​J,​K>

  • All Implemented Interfaces:
    Serializable

    public class Tuple11<A,​B,​C,​D,​E,​F,​G,​H,​I,​J,​K>
    extends Object
    implements Serializable
    Holds 11 items of potentially different types. Designed to let you easily create immutable subclasses (to give your data structures meaningful names) with correct equals(), hashCode(), and toString() methods.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected A _1  
      protected J _10  
      protected K _11  
      protected B _2  
      protected C _3  
      protected D _4  
      protected E _5  
      protected F _6  
      protected G _7  
      protected H _8  
      protected I _9  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Tuple11​(A a, B b, C c, D d, E e, F f, G g, H h, I i, J j, K k)
      Constructor is protected (not public) for easy inheritance.
    • Field Detail

      • _1

        protected final A _1
      • _2

        protected final B _2
      • _3

        protected final C _3
      • _4

        protected final D _4
      • _5

        protected final E _5
      • _6

        protected final F _6
      • _7

        protected final G _7
      • _8

        protected final H _8
      • _9

        protected final I _9
      • _10

        protected final J _10
      • _11

        protected final K _11
    • Constructor Detail

      • Tuple11

        protected Tuple11​(A a,
                          B b,
                          C c,
                          D d,
                          E e,
                          F f,
                          G g,
                          H h,
                          I i,
                          J j,
                          K k)
        Constructor is protected (not public) for easy inheritance. Josh Bloch's "Item 1" says public static factory methods are better than constructors because they have names, they can return an existing object instead of a new one, and they can return a subtype. Therefore, you have more flexibility with a static factory as part of your public API then with a public constructor.
    • Method Detail

      • of

        @NotNull
        public static <A,​B,​C,​D,​E,​F,​G,​H,​I,​J,​K> @NotNull Tuple11<A,​B,​C,​D,​E,​F,​G,​H,​I,​J,​K> of​(A a,
                                                                                                                                                                                                                 B b,
                                                                                                                                                                                                                 C c,
                                                                                                                                                                                                                 D d,
                                                                                                                                                                                                                 E e,
                                                                                                                                                                                                                 F f,
                                                                                                                                                                                                                 G g,
                                                                                                                                                                                                                 H h,
                                                                                                                                                                                                                 I i,
                                                                                                                                                                                                                 J j,
                                                                                                                                                                                                                 K k)
        Public static factory method
      • _1

        public A _1()
        Returns the 1st field
      • _2

        public B _2()
        Returns the 2nd field
      • _3

        public C _3()
        Returns the 3rd field
      • _4

        public D _4()
        Returns the 4th field
      • _5

        public E _5()
        Returns the 5th field
      • _6

        public F _6()
        Returns the 6th field
      • _7

        public G _7()
        Returns the 7th field
      • _8

        public H _8()
        Returns the 8th field
      • _9

        public I _9()
        Returns the 9th field
      • _10

        public J _10()
        Returns the 10th field
      • _11

        public K _11()
        Returns the 11th field
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object