A
- the type of the first elementB
- the type of the second elementC
- the type of the third elementpublic final class Triplet<A extends com.google.protobuf.Message,B,C> extends Tuple
The first element must be a non-default Message
and not Empty
.
Other two can be Message
, Optional
or
Either
.
Modifier and Type | Method and Description |
---|---|
A |
getA()
Obtains the first element of the tuple.
|
B |
getB()
Obtains the second element of the tuple.
|
C |
getC()
Obtains the third element of the tuple.
|
static <A extends com.google.protobuf.Message,B extends com.google.protobuf.Message,C extends com.google.protobuf.Message> |
of(A a,
B b,
C c)
Creates new triplet with the passed values.
|
static <A extends com.google.protobuf.Message,B extends com.google.protobuf.Message,C extends com.google.protobuf.Message> |
withNullable(A a,
B b,
C c)
Creates a triplet with the last element optional.
|
static <A extends com.google.protobuf.Message,B extends com.google.protobuf.Message,C extends com.google.protobuf.Message> |
withNullable2(A a,
B b,
C c)
Creates a new triplet with optional second and third elements.
|
public static <A extends com.google.protobuf.Message,B extends com.google.protobuf.Message,C extends com.google.protobuf.Message> Triplet<A,B,C> of(A a, B b, C c)
public static <A extends com.google.protobuf.Message,B extends com.google.protobuf.Message,C extends com.google.protobuf.Message> Triplet<A,B,java.util.Optional<C>> withNullable(A a, B b, C c)
public static <A extends com.google.protobuf.Message,B extends com.google.protobuf.Message,C extends com.google.protobuf.Message> Triplet<A,java.util.Optional<B>,java.util.Optional<C>> withNullable2(A a, B b, C c)
public A getA()
public B getB()
public C getC()