All Known Implementing Classes:
Tuple0, Tuple1, Tuple2, Tuple3, Tuple4

public interface Tuple
A Tuple combines a fixed number of elements together so that they can be passed around as a whole. Unlike an array or list, a tuple can hold objects with different types, but they are also immutable.

This class has been derived from 'vavr' Tuple.java.

Tuple.java. Copyright 2023 (c) vavr. MIT License.
github.com
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static <T1, T2> Tuple2<T1,T2>
    of(T1 _1, T2 _2)
     
    static <T1, T2, T3>
    Tuple3<T1,T2,T3>
    of(T1 _1, T2 _2, T3 _3)
     
    static <T1, T2, T3, T4>
    Tuple4<T1,T2,T3,T4>
    of(T1 _1, T2 _2, T3 _3, T4 _4)
     
  • Method Details

    • of

      static <T1, T2> Tuple2<T1,T2> of(T1 _1, T2 _2)
    • of

      static <T1, T2, T3> Tuple3<T1,T2,T3> of(T1 _1, T2 _2, T3 _3)
    • of

      static <T1, T2, T3, T4> Tuple4<T1,T2,T3,T4> of(T1 _1, T2 _2, T3 _3, T4 _4)