Package it.unimi.dsi.fastutil.objects
Class ObjectDoubleMutablePair<K>
- java.lang.Object
-
- it.unimi.dsi.fastutil.objects.ObjectDoubleMutablePair<K>
-
- All Implemented Interfaces:
ObjectDoublePair<K>,Pair<K,Double>,Serializable
public class ObjectDoubleMutablePair<K> extends Object implements ObjectDoublePair<K>, 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 ObjectDoubleMutablePair(K 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()Kleft()Returns the left element of this pair.ObjectDoubleMutablePair<K>left(K l)Sets the left element of this pair (optional operation).static <K> ObjectDoubleMutablePair<K>of(K left, double right)Returns a new type-specific mutablePairwith given left and right value.ObjectDoubleMutablePair<K>right(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>.-
Methods inherited from interface it.unimi.dsi.fastutil.objects.ObjectDoublePair
right, right, second, second, second, secondDouble, value, value, value, valueDouble
-
-
-
-
Method Detail
-
of
public static <K> ObjectDoubleMutablePair<K> of(K 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.
-
left
public ObjectDoubleMutablePair<K> left(K l)
Description copied from interface:PairSets the left element of this pair (optional operation).
-
rightDouble
public double rightDouble()
Description copied from interface:ObjectDoublePairReturns the right element of this pair.- Specified by:
rightDoublein interfaceObjectDoublePair<K>- Returns:
- the right element of this pair.
-
right
public ObjectDoubleMutablePair<K> right(double r)
Description copied from interface:ObjectDoublePairSets the right element of this pair (optional operation).- Specified by:
rightin interfaceObjectDoublePair<K>- Parameters:
r- a new value for the right element.
-
-