Class Tuple<O1,O2>

java.lang.Object
io.fi0x.javadatastructures.Tuple<O1,O2>
Type Parameters:
O1 - The Type of the first Object that is stored in this Tuple.
O2 - The Type of the second Object that is stored in this Tuple.

public class Tuple<O1,O2> extends Object
This class is used as a data-structure to support tuples of objects.
  • Constructor Details

    • Tuple

      public Tuple(O1 value1, O2 value2)
      The main constructor of this data-structure.
      Parameters:
      value1 - The Object that should be stored as the first part of this Tuple.
      value2 - The Object that should be stored as the second part of this Tuple.
  • Method Details

    • setObject1

      public void setObject1(O1 value)
      This method changes the first Object of this Tuple.
      Parameters:
      value - The new Object.
    • getObject1

      public O1 getObject1()
      This method returns the first Object of this Tuple.
      Returns:
      The first Object of this Tuple.
    • setObject2

      public void setObject2(O2 value)
      This method changes the second Object of this Tuple.
      Parameters:
      value - The new Object.
    • getObject2

      public O2 getObject2()
      This method returns the second Object of this Tuple.
      Returns:
      The second Object of this Tuple.