Package mondrian.util
Class Triple<T0,T1,T2>
java.lang.Object
mondrian.util.Triple<T0,T1,T2>
- All Implemented Interfaces:
Comparable<Triple<T0,
T1, T2>>
Tuple of three values.
Because a triple implements equals(Object)
, hashCode()
and compareTo(mondrian.util.Triple)
, it can be used in any kind of
Collection
.
- Author:
- jhyde
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
int
hashCode()
static <T0,
T1, T2> Iterable<T0> Returns an iterable over the slice #0 of an iterable.static <T0,
T1, T2> Iterable<T1> Returns an iterable over the slice #1 of an iterable.static <T0,
T1, T2> Iterable<T2> Returns an iterable over the slice #2 of an iterable.static <T0,
T1, T2> Triple<T0, T1, T2> of
(T0 v0, T1 v1, T2 v2) Creates a Triple.toString()
-
Field Details
-
v0
-
v1
-
v2
-
-
Constructor Details
-
Triple
Creates a Triple.- Parameters:
v0
- Value #0v1
- Value #1v2
- Value #2
-
-
Method Details
-
of
Creates a Triple.- Parameters:
v0
- Value #0v1
- Value #1v2
- Value #2- Returns:
- a new Triple
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<T0>
-
toString
-
iter0
Returns an iterable over the slice #0 of an iterable.- Type Parameters:
T0
- Type #0T1
- Type #1T2
- Type #2- Parameters:
iterable
- Iterable over triples- Returns:
- Iterable over the 0'th elements of each triple
-
iter1
Returns an iterable over the slice #1 of an iterable.- Type Parameters:
T0
- Type #0T1
- Type #1T2
- Type #2- Parameters:
iterable
- Iterable over triples- Returns:
- Iterable over the 1'th elements of each triple
-
iter2
Returns an iterable over the slice #2 of an iterable.- Type Parameters:
T0
- Type #0T1
- Type #1T2
- Type #2- Parameters:
iterable
- Iterable over triples- Returns:
- Iterable over the 2'th elements of each triple
-