Class Tuple<T,S>

java.lang.Object
type.Tuple<T,S>
Type Parameters:
T - type of the first element | type du premier élément
S - type of the second element | type du second élément

public class Tuple<T,S> extends Object
A generic tuple holding two values of potentially different types | Un tuple générique contenant deux valeurs de types potentiellement différents.
Author:
FIGUEIRAS Jossua
  • Constructor Summary

    Constructors
    Constructor
    Description
    Tuple(T f, S s)
    Constructs a Tuple with the given elements | Construit un Tuple avec les éléments donnés.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the first element of the tuple | Retourne le premier élément du tuple.
    Returns the second element of the tuple | Retourne le second élément du tuple.
    void
    Sets the first element of the tuple | Définit le premier élément du tuple.
    void
    Sets the second element of the tuple | Définit le second élément du tuple.

    Methods inherited from class Object

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

    • Tuple

      public Tuple(T f, S s)
      Constructs a Tuple with the given elements | Construit un Tuple avec les éléments donnés.
      Parameters:
      f - the first element | le premier élément
      s - the second element | le second élément
  • Method Details

    • getFirst

      public T getFirst()
      Returns the first element of the tuple | Retourne le premier élément du tuple.
      Returns:
      the first element | le premier élément
    • setFirst

      public void setFirst(T f)
      Sets the first element of the tuple | Définit le premier élément du tuple.
      Parameters:
      f - the new first element | le nouvel élément
    • getSecond

      public S getSecond()
      Returns the second element of the tuple | Retourne le second élément du tuple.
      Returns:
      the second element | le second élément
    • setSecond

      public void setSecond(S s)
      Sets the second element of the tuple | Définit le second élément du tuple.
      Parameters:
      s - the new second element | le nouvel élément