Package it.unimi.dsi.fastutil.chars
Class CharDoubleMutablePair
- java.lang.Object
-
- it.unimi.dsi.fastutil.chars.CharDoubleMutablePair
-
- All Implemented Interfaces:
CharDoublePair,Pair<Character,Double>,Serializable
public class CharDoubleMutablePair extends Object implements CharDoublePair, 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 CharDoubleMutablePair(char left, double 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()CharDoubleMutablePairleft(char l)Sets the left element of this pair (optional operation).charleftChar()Returns the left element of this pair.static CharDoubleMutablePairof(char left, double right)Returns a new type-specific mutablePairwith given left and right value.CharDoubleMutablePairright(double r)Sets the right element of this pair (optional operation).doublerightDouble()Returns the right element of this pair.StringtoString()Returns a string representation of this pair in the form <l,r>.
-
-
-
Constructor Detail
-
CharDoubleMutablePair
public CharDoubleMutablePair(char left, double 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 CharDoubleMutablePair of(char left, double 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.
-
leftChar
public char leftChar()
Description copied from interface:CharDoublePairReturns the left element of this pair.- Specified by:
leftCharin interfaceCharDoublePair- Returns:
- the left element of this pair.
-
left
public CharDoubleMutablePair left(char l)
Description copied from interface:CharDoublePairSets the left element of this pair (optional operation).- Specified by:
leftin interfaceCharDoublePair- Parameters:
l- a new value for the left element.
-
rightDouble
public double rightDouble()
Description copied from interface:CharDoublePairReturns the right element of this pair.- Specified by:
rightDoublein interfaceCharDoublePair- Returns:
- the right element of this pair.
-
right
public CharDoubleMutablePair right(double r)
Description copied from interface:CharDoublePairSets the right element of this pair (optional operation).- Specified by:
rightin interfaceCharDoublePair- Parameters:
r- a new value for the right element.
-
-