Package util

Class Pair<L,R>

java.lang.Object
util.Pair<L,R>

public class Pair<L,R> extends Object
A Pair is a tupel of two different values with potentially two different types.
Since:
25.06.2021
Author:
Juyas
  • Constructor Details

    • Pair

      public Pair(L left, R right)
      Create a Pair of two values.
      Parameters:
      left - first value
      right - second value
    • Pair

      public Pair()
      Create a Pair with no values.
  • Method Details

    • getLeft

      public L getLeft()
      See Also:
      • left
    • setLeft

      public void setLeft(L left)
      See Also:
      • left
    • getRight

      public R getRight()
      See Also:
      • right
    • setRight

      public void setRight(R right)
      See Also:
      • right
    • extend

      public <RR> Triple<L,R,RR> extend(RR right)
      Extends this Pair with a third value to a triple.
      See Also: