Class DoubleByteMutablePair

java.lang.Object
it.unimi.dsi.fastutil.doubles.DoubleByteMutablePair
All Implemented Interfaces:
DoubleBytePair, Pair<Double,Byte>, Serializable

public class DoubleByteMutablePair extends Object implements DoubleBytePair, Serializable
A type-specific mutable Pair; provides some additional methods that use polymorphism to avoid (un)boxing.
See Also:
  • Constructor Details

    • DoubleByteMutablePair

      public DoubleByteMutablePair(double left, byte right)
      Creates a new type-specific mutable Pair with given left and right value.
      Parameters:
      left - the left value.
      right - the right value.
  • Method Details

    • of

      public static DoubleByteMutablePair of(double left, byte right)
      Returns a new type-specific mutable Pair with given left and right value.
      Parameters:
      left - the left value.
      right - the right value.
      Implementation Specification:
      This factory method delegates to the constructor.
    • leftDouble

      public double leftDouble()
      Description copied from interface: DoubleBytePair
      Returns the left element of this pair.
      Specified by:
      leftDouble in interface DoubleBytePair
      Returns:
      the left element of this pair.
    • left

      public DoubleByteMutablePair left(double l)
      Description copied from interface: DoubleBytePair
      Sets the left element of this pair (optional operation).
      Specified by:
      left in interface DoubleBytePair
      Parameters:
      l - a new value for the left element.
    • rightByte

      public byte rightByte()
      Description copied from interface: DoubleBytePair
      Returns the right element of this pair.
      Specified by:
      rightByte in interface DoubleBytePair
      Returns:
      the right element of this pair.
    • right

      public DoubleByteMutablePair right(byte r)
      Description copied from interface: DoubleBytePair
      Sets the right element of this pair (optional operation).
      Specified by:
      right in interface DoubleBytePair
      Parameters:
      r - a new value for the right element.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Returns a string representation of this pair in the form <l,r>.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this pair in the form <l,r>.