Interface IPair<L,R>

Type Parameters:
L - type of the left element
R - type of the right element
All Superinterfaces:
Cloneable, IClone<IPair<L,R>>, Map.Entry<L,R>, Serializable
All Known Implementing Classes:
Pair

public interface IPair<L,R> extends Map.Entry<L,R>, IClone<IPair<L,R>>, Serializable
A pair of two elements, identified as 'left' and 'right'.

A pair can also be seen as a Map.Entry, in that case the left value is seen as the entry key, and the right value is seen as the entry value.

Author:
ActiveViam
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the left element.
    Gets the right element.
    setLeft(L left)
    Sets the left element, returning the previous value.
    setRight(R right)
    Sets the right element, returning the previous value.

    Methods inherited from interface com.quartetfs.fwk.IClone

    clone

    Methods inherited from interface java.util.Map.Entry

    equals, getKey, getValue, hashCode, setValue
  • Method Details

    • getLeft

      L getLeft()
      Gets the left element.
      Returns:
      the left element
    • getRight

      R getRight()
      Gets the right element.
      Returns:
      the right element
    • setLeft

      L setLeft(L left)
      Sets the left element, returning the previous value.
      Parameters:
      left - the value to set on the left
      Returns:
      the previous value
    • setRight

      R setRight(R right)
      Sets the right element, returning the previous value.
      Parameters:
      right - the value to set on the right
      Returns:
      the previous value