Package it.unimi.dsi.fastutil.ints
Class IntIntImmutablePair
- java.lang.Object
-
- it.unimi.dsi.fastutil.ints.IntIntImmutablePair
-
- All Implemented Interfaces:
IntIntPair,Pair<Integer,Integer>,Serializable
- Direct Known Subclasses:
IntIntImmutableSortedPair
public class IntIntImmutablePair extends Object implements IntIntPair, Serializable
A type-specific immutablePair; provides some additional methods that use polymorphism to avoid (un)boxing.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IntIntImmutablePair(int left, int right)Creates a new type-specific immutablePairwith given left and right value.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)inthashCode()intleftInt()Returns the left element of this pair.static IntIntImmutablePairof(int left, int right)Returns a new type-specific immutablePairwith given left and right value.intrightInt()Returns the right element of this pair.StringtoString()Returns a string representation of this pair in the form <l,r>.
-
-
-
Constructor Detail
-
IntIntImmutablePair
public IntIntImmutablePair(int left, int right)Creates a new type-specific immutablePairwith given left and right value.- Parameters:
left- the left value.right- the right value.
-
-
Method Detail
-
of
public static IntIntImmutablePair of(int left, int right)
Returns a new type-specific immutablePairwith given left and right value.- Parameters:
left- the left value.right- the right value.- Implementation Notes:
- This factory method delegates to the constructor.
-
leftInt
public int leftInt()
Description copied from interface:IntIntPairReturns the left element of this pair.- Specified by:
leftIntin interfaceIntIntPair- Returns:
- the left element of this pair.
-
rightInt
public int rightInt()
Description copied from interface:IntIntPairReturns the right element of this pair.- Specified by:
rightIntin interfaceIntIntPair- Returns:
- the right element of this pair.
-
-