Interface FloatFloatPair

All Superinterfaces:
Pair<Float,Float>
All Known Subinterfaces:
FloatFloatSortedPair
All Known Implementing Classes:
FloatFloatImmutablePair, FloatFloatImmutableSortedPair, FloatFloatMutablePair

public interface FloatFloatPair extends Pair<Float,Float>
A type-specific Pair; provides some additional methods that use polymorphism to avoid (un)boxing.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    default Float
    Deprecated.
    Please use the corresponding type-specific method instead.
    first(float l)
    Sets the left element of this pair (optional operation).
    Deprecated.
    Please use the corresponding type-specific method instead.
    default float
    Returns the left element of this pair.
    default Float
    key()
    Deprecated.
    Please use the corresponding type-specific method instead.
    key(float l)
    Sets the left element of this pair (optional operation).
    Deprecated.
    default float
    Returns the left element of this pair.
    default Float
    Deprecated.
    Please use the corresponding type-specific method instead.
    left(float l)
    Sets the left element of this pair (optional operation).
    Deprecated.
    Please use the corresponding type-specific method instead.
    float
    Returns the left element of this pair.
    Returns a lexicographical comparator for pairs.
    of(float left, float right)
    Returns a new type-specific immutable Pair with given left and right value.
    default Float
    Deprecated.
    Please use the corresponding type-specific method instead.
    right(float r)
    Sets the right element of this pair (optional operation).
    Deprecated.
    Please use the corresponding type-specific method instead.
    float
    Returns the right element of this pair.
    default Float
    Deprecated.
    Please use the corresponding type-specific method instead.
    second(float r)
    Sets the right element of this pair (optional operation).
    Deprecated.
    Please use the corresponding type-specific method instead.
    default float
    Returns the right element of this pair.
    default Float
    Deprecated.
    Please use the corresponding type-specific method instead.
    value(float r)
    Sets the right element of this pair (optional operation).
    Deprecated.
    Please use the corresponding type-specific method instead.
    default float
    Returns the right element of this pair.
  • Method Details Link icon

    • leftFloat Link icon

      float leftFloat()
      Returns the left element of this pair.
      Returns:
      the left element of this pair.
    • left Link icon

      @Deprecated default Float left()
      Deprecated.
      Please use the corresponding type-specific method instead.
      Returns the left element of this pair.
      Specified by:
      left in interface Pair<Float,Float>
      Returns:
      the left element of this pair.
    • left Link icon

      default FloatFloatPair left(float l)
      Sets the left element of this pair (optional operation).
      Parameters:
      l - a new value for the left element.
      Implementation Specification:
      This implementation throws an UnsupportedOperationException.
    • left Link icon

      @Deprecated default FloatFloatPair left(Float l)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Sets the left element of this pair (optional operation).
      Specified by:
      left in interface Pair<Float,Float>
      Parameters:
      l - a new value for the left element.
    • firstFloat Link icon

      default float firstFloat()
      Returns the left element of this pair.
      Returns:
      the left element of this pair.
      Implementation Specification:
      This implementation delegates to left().
    • first Link icon

      @Deprecated default Float first()
      Deprecated.
      Please use the corresponding type-specific method instead.
      Returns the left element of this pair.
      Specified by:
      first in interface Pair<Float,Float>
      Returns:
      the left element of this pair.
    • first Link icon

      default FloatFloatPair first(float l)
      Sets the left element of this pair (optional operation).
      Parameters:
      l - a new value for the left element.
      Implementation Specification:
      This implementation delegates to Pair.left(Object).
    • first Link icon

      @Deprecated default FloatFloatPair first(Float l)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Sets the left element of this pair (optional operation).
      Specified by:
      first in interface Pair<Float,Float>
      Parameters:
      l - a new value for the left element.
    • keyFloat Link icon

      default float keyFloat()
      Returns the left element of this pair.
      Returns:
      the left element of this pair.
      Implementation Specification:
      This implementation delegates to left().
    • key Link icon

      @Deprecated default Float key()
      Deprecated.
      Please use the corresponding type-specific method instead.
      Returns the left element of this pair.
      Specified by:
      key in interface Pair<Float,Float>
      Returns:
      the left element of this pair.
    • key Link icon

      default FloatFloatPair key(float l)
      Sets the left element of this pair (optional operation).
      Parameters:
      l - a new value for the left element.
      Implementation Specification:
      This implementation delegates to Pair.left(Object).
    • key Link icon

      @Deprecated default FloatFloatPair key(Float l)
      Deprecated.
      Description copied from interface: Pair
      Sets the left element of this pair (optional operation).
      Specified by:
      key in interface Pair<Float,Float>
      Parameters:
      l - a new value for the left element.
    • rightFloat Link icon

      float rightFloat()
      Returns the right element of this pair.
      Returns:
      the right element of this pair.
    • right Link icon

      @Deprecated default Float right()
      Deprecated.
      Please use the corresponding type-specific method instead.
      Returns the right element of this pair.
      Specified by:
      right in interface Pair<Float,Float>
      Returns:
      the right element of this pair.
    • right Link icon

      default FloatFloatPair right(float r)
      Sets the right element of this pair (optional operation).
      Parameters:
      r - a new value for the right element.
      Implementation Specification:
      This implementation throws an UnsupportedOperationException.
    • right Link icon

      @Deprecated default FloatFloatPair right(Float l)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Sets the right element of this pair (optional operation).
      Specified by:
      right in interface Pair<Float,Float>
      Parameters:
      l - a new value for the right element.
    • secondFloat Link icon

      default float secondFloat()
      Returns the right element of this pair.
      Returns:
      the right element of this pair.
      Implementation Specification:
      This implementation delegates to right().
    • second Link icon

      @Deprecated default Float second()
      Deprecated.
      Please use the corresponding type-specific method instead.
      Returns the right element of this pair.
      Specified by:
      second in interface Pair<Float,Float>
      Returns:
      the right element of this pair.
    • second Link icon

      default FloatFloatPair second(float r)
      Sets the right element of this pair (optional operation).
      Parameters:
      r - a new value for the right element.
      Implementation Specification:
      This implementation delegates to Pair.right(Object).
    • second Link icon

      @Deprecated default FloatFloatPair second(Float l)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Sets the right element of this pair (optional operation).
      Specified by:
      second in interface Pair<Float,Float>
      Parameters:
      l - a new value for the right element.
    • valueFloat Link icon

      default float valueFloat()
      Returns the right element of this pair.
      Returns:
      the right element of this pair.
      Implementation Specification:
      This implementation delegates to right().
    • value Link icon

      @Deprecated default Float value()
      Deprecated.
      Please use the corresponding type-specific method instead.
      Returns the right element of this pair.
      Specified by:
      value in interface Pair<Float,Float>
      Returns:
      the right element of this pair.
    • value Link icon

      default FloatFloatPair value(float r)
      Sets the right element of this pair (optional operation).
      Parameters:
      r - a new value for the right element.
      Implementation Specification:
      This implementation delegates to Pair.right(Object).
    • value Link icon

      @Deprecated default FloatFloatPair value(Float l)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Sets the right element of this pair (optional operation).
      Specified by:
      value in interface Pair<Float,Float>
      Parameters:
      l - a new value for the right element.
    • of Link icon

      static FloatFloatPair of(float left, float right)
      Returns a new type-specific immutable Pair with given left and right value.
      Parameters:
      left - the left value.
      right - the right value.
    • lexComparator Link icon

      static Comparator<FloatFloatPair> lexComparator()
      Returns a lexicographical comparator for pairs.

      The comparator returned by this method implements lexicographical order. It compares first the left elements: if the result of the comparison is nonzero, it returns said result. Otherwise, this comparator returns the result of the comparison of the right elements.

      Returns:
      a lexicographical comparator for pairs.