Package io.permazen.tuple
Class Tuple2<V1,V2>
java.lang.Object
io.permazen.tuple.Tuple2<V1,V2>
- Type Parameters:
V1
- first value typeV2
- second value type
A tuple of two values.
Instances are immutable.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Tuple2
Constructor.- Parameters:
v1
- the first valuev2
- the second value
-
-
Method Details
-
getValue2
Description copied from interface:Has2
Get the second value. -
getSize
public int getSize()Description copied from interface:Tuple
Get the number of values in this tuple. -
asList
Description copied from interface:Tuple
View this instance as a list. -
getValue1
Description copied from interface:Has1
Get the first value. -
toString
-
equals
Description copied from interface:Tuple
Compare for equality.Tuples are equal if they have the same size and the corresponding individual values are equal (or null).
-
hashCode
public int hashCode()Description copied from interface:Tuple
Compute hash code.The hash code of a tuple is the exclusive-OR of the hash codes of the individual values (using zero for null values).
-