A
- The object a type.B
- The object b type.public class Tuple2<A,B> extends Object
a
and b
.equals(Object)
and hashCode()
, based on the two objects.tup1
and tup2
have the same objects, but in different order,
tup1.equals(tup2)
may be false and tup1.hashCode() == tup2.hashCode()
may be false.Tuple2.newInstance(1, 2).equals(Tuple2.newInstance(2, 1))
is false.Tuple2.newInstance(1, 2).hashCode() == Tuple2.newInstance(2, 1).hashCode()
is false.null
values.Modifier and Type | Method and Description |
---|---|
A |
a() |
B |
b() |
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
isEmpty()
Returns whether this tupple is empty (composed with
null values). |
static <A,B> Tuple2<A,B> |
of(A a,
B b)
Creates a new instance.
|
String |
toString() |
public static <A,B> Tuple2<A,B> of(A a, B b)
a
- the object a.b
- the object b.public A a()
public B b()
public boolean isEmpty()
null
values).null
values).LumisXP 12.5.0.200928 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.