Package it.unimi.dsi.fastutil.bytes
Class ByteFloatMutablePair
- java.lang.Object
-
- it.unimi.dsi.fastutil.bytes.ByteFloatMutablePair
-
- All Implemented Interfaces:
ByteFloatPair,Pair<Byte,Float>,Serializable
public class ByteFloatMutablePair extends Object implements ByteFloatPair, Serializable
A type-specific mutablePair; provides some additional methods that use polymorphism to avoid (un)boxing.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ByteFloatMutablePair(byte left, float right)Creates a new type-specific mutablePairwith given left and right value.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)inthashCode()ByteFloatMutablePairleft(byte l)Sets the left element of this pair (optional operation).byteleftByte()Returns the left element of this pair.static ByteFloatMutablePairof(byte left, float right)Returns a new type-specific mutablePairwith given left and right value.ByteFloatMutablePairright(float r)Sets the right element of this pair (optional operation).floatrightFloat()Returns the right element of this pair.StringtoString()Returns a string representation of this pair in the form <l,r>.
-
-
-
Constructor Detail
-
ByteFloatMutablePair
public ByteFloatMutablePair(byte left, float right)Creates a new type-specific mutablePairwith given left and right value.- Parameters:
left- the left value.right- the right value.
-
-
Method Detail
-
of
public static ByteFloatMutablePair of(byte left, float right)
Returns a new type-specific mutablePairwith given left and right value.- Parameters:
left- the left value.right- the right value.- Implementation Notes:
- This factory method delegates to the constructor.
-
leftByte
public byte leftByte()
Description copied from interface:ByteFloatPairReturns the left element of this pair.- Specified by:
leftBytein interfaceByteFloatPair- Returns:
- the left element of this pair.
-
left
public ByteFloatMutablePair left(byte l)
Description copied from interface:ByteFloatPairSets the left element of this pair (optional operation).- Specified by:
leftin interfaceByteFloatPair- Parameters:
l- a new value for the left element.
-
rightFloat
public float rightFloat()
Description copied from interface:ByteFloatPairReturns the right element of this pair.- Specified by:
rightFloatin interfaceByteFloatPair- Returns:
- the right element of this pair.
-
right
public ByteFloatMutablePair right(float r)
Description copied from interface:ByteFloatPairSets the right element of this pair (optional operation).- Specified by:
rightin interfaceByteFloatPair- Parameters:
r- a new value for the right element.
-
-