Package eu.bandm.tools.util.anon
Class Tuple2<A0,A1>
java.lang.Object
eu.bandm.tools.util.anon.Tuple2<A0,A1>
- Type Parameters:
A0
- the type of the first component.A1
- the type of the second component.
- All Implemented Interfaces:
Tuploid1<A0>
,Tuploid2<A0,
,A1> Serializable
Implementation of a tuple with two components.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Convenience class for building a list of 2-tuples. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Check whether all components of the given tuple are equal to the corresponding components of this tuple.boolean
Check whether the given object is a 2-tuple and all its components are equal to the corresponding components of this tuple.get0()
Get the value of the first component.get1()
Get the value of the second component.int
hashCode()
toString()
-
Constructor Details
-
Tuple2
Only constructor.- Parameters:
elem0
- the value for the first componentelem1
- the value for the second component
-
-
Method Details
-
get0
Get the value of the first component. -
get1
Get the value of the second component. -
equals
Check whether the given object is a 2-tuple and all its components are equal to the corresponding components of this tuple. -
equals
Check whether all components of the given tuple are equal to the corresponding components of this tuple.- Parameters:
t
- the 2-tuple to compare with- Returns:
- whether both tuples have equal components.
-
hashCode
public int hashCode() -
toString
-