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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T,U, V> Triple <T, U, V> Creates aTriplefrom aPairand 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
-
Constructor Details
-
Method Details
-
of
Creates aTriplefrom aPairand another value.- Type Parameters:
T- the former type of thePairU- the latter type of thePairV- the type of the value- Parameters:
pair- thePairvalue- the value- Returns:
- the
StreamofTriples
-
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 thePairU- the latter type of thePairV- the type of theStream- Parameters:
pair- thePairstream- theStream- Returns:
- the
StreamofTriples
-
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 thePairU- the latter type of thePair- Parameters:
pair- thePairfrom- the first value of the integerStream(included)to- the last value of the integerStream(excluded)- Returns:
- the
StreamofTriples
-
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 thePairU- the latter type of thePair- Parameters:
pair- thePairfrom- the first value of the integerStream(included)to- the last value of the integerStream(included)- Returns:
- the
StreamofTriples
-