Package it.tidalwave.util
Class Triple<A,B,C>
java.lang.Object
it.tidalwave.util.Triple<A,B,C>
A value object that contains a triple of values.
- Since:
- 3.2-ALPHA-12
- Author:
- Fabrizio Giudici
- Status: draft API
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,
U, V> Triple <T, U, V> Creates aTriple
from aPair
and another value.tripleRange
(Pair<T, U> pair, int from, int to) tripleRangeClosed
(Pair<T, U> pair, int from, int to) tripleStream
(Pair<T, U> pair, Stream<? extends V> stream)
-
Field Details
-
a
-
b
-
c
-
-
Constructor Details
-
Triple
public Triple()
-
-
Method Details
-
of
Creates aTriple
from aPair
and another value.- Type Parameters:
T
- the former type of thePair
U
- the latter type of thePair
V
- the type of the value- Parameters:
pair
- thePair
value
- the value- Returns:
- the
Stream
ofTriple
s
-
tripleStream
@Nonnull public static <T,U, Stream<Triple<T,V> U, tripleStreamV>> (@Nonnull Pair<T, U> pair, @Nonnull Stream<? extends V> stream) - Type Parameters:
T
- the former type of thePair
U
- the latter type of thePair
V
- the type of theStream
- Parameters:
pair
- thePair
stream
- theStream
- Returns:
- the
Stream
ofTriple
s
-
tripleRange
@Nonnull public static <T,U> Stream<Triple<T,U, tripleRangeInteger>> (@Nonnull Pair<T, U> pair, @Nonnegative int from, @Nonnegative int to) - Type Parameters:
T
- the former type of thePair
U
- the latter type of thePair
- Parameters:
pair
- thePair
from
- the first value of the integerStream
(included)to
- the last value of the integerStream
(excluded)- Returns:
- the
Stream
ofTriple
s
-
tripleRangeClosed
@Nonnull public static <T,U> Stream<Triple<T,U, tripleRangeClosedInteger>> (@Nonnull Pair<T, U> pair, @Nonnegative int from, @Nonnegative int to) - Type Parameters:
T
- the former type of thePair
U
- the latter type of thePair
- Parameters:
pair
- thePair
from
- the first value of the integerStream
(included)to
- the last value of the integerStream
(included)- Returns:
- the
Stream
ofTriple
s
-