Package lumis.util.collections
Class Tuple3<A,B,C>
- java.lang.Object
-
- lumis.util.collections.Tuple2<A,B>
-
- lumis.util.collections.Tuple3<A,B,C>
-
- Type Parameters:
A
- The object a type.B
- The object b type.C
- The object c type.
public class Tuple3<A,B,C> extends Tuple2<A,B>
Three-object holder. The three objects are called by convention,a
,b
andc
.
Implementsequals(Object)
andhashCode()
, based on the three objects.
If two tuplestup1
andtup2
have the same objects, but in different order,tup1.equals(tup2)
may be false andtup1.hashCode() == tup2.hashCode()
may be false.
Example:
Tuple3.newInstance(1, 2, 3).equals(Tuple3.newInstance(3, 2, 1))
is false.
Tuple3.newInstance(1, 2, 3).hashCode() == Tuple3.newInstance(3, 2, 1).hashCode()
is false.
This holder acceptsnull
values.- Since:
- 10.2.0
- Version:
- $Revision$ $Date$
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description C
c()
boolean
equals(java.lang.Object obj)
int
hashCode()
boolean
isEmpty()
Returns whether this tupple is empty (composed withnull
values).static <A,B,C>
Tuple3<A,B,C>newInstance(A a, B b, C c)
Deprecated.since 11.0.0, replaced byof(Object, Object, Object)
.static <A,B,C>
Tuple3<A,B,C>of(A a, B b, C c)
Creates a new instance.java.lang.String
toString()
-
-
-
Method Detail
-
of
public static <A,B,C> Tuple3<A,B,C> of(A a, B b, C c)
Creates a new instance.- Parameters:
a
- the object a.b
- the object b.c
- the object c.- Returns:
- the created instance.
- Since:
- 11.0.0
-
newInstance
@Deprecated public static <A,B,C> Tuple3<A,B,C> newInstance(A a, B b, C c)
Deprecated.since 11.0.0, replaced byof(Object, Object, Object)
.Creates a new instance.- Parameters:
a
- the object a.b
- the object b.c
- the object c.- Returns:
- the created instance.
- Since:
- 10.2.0
-
c
public C c()
-
-