A
- the type of the first elementB
- the type of the second elementC
- the type of the third elementD
- the type of the fourth elementpublic final class Quartet<A extends com.google.protobuf.Message,B,C,D> extends Tuple
The first element must be a non-default Message
and not Empty
.
Other three 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.
|
D |
getD()
Obtains the fourth element of the tuple.
|
static <A extends com.google.protobuf.Message,B extends com.google.protobuf.Message,C extends com.google.protobuf.Message,D extends com.google.protobuf.Message> |
of(A a,
B b,
C c,
D d)
Creates a quartet with all values present.
|
static <A extends com.google.protobuf.Message,B extends com.google.protobuf.Message,C extends com.google.protobuf.Message,D extends com.google.protobuf.Message> |
withNullable(A a,
B b,
C c,
D d)
Creates a quartet with one optional value.
|
static <A extends com.google.protobuf.Message,B extends com.google.protobuf.Message,C extends com.google.protobuf.Message,D extends com.google.protobuf.Message> |
withNullable2(A a,
B b,
C c,
D d)
Creates a quartet with two optional values.
|
static <A extends com.google.protobuf.Message,B extends com.google.protobuf.Message,C extends com.google.protobuf.Message,D extends com.google.protobuf.Message> |
withNullable3(A a,
B b,
C c,
D d)
Creates a quartet with three optional values.
|
public static <A extends com.google.protobuf.Message,B extends com.google.protobuf.Message,C extends com.google.protobuf.Message,D extends com.google.protobuf.Message> Quartet<A,B,C,D> of(A a, B b, C c, D d)
public static <A extends com.google.protobuf.Message,B extends com.google.protobuf.Message,C extends com.google.protobuf.Message,D extends com.google.protobuf.Message> Quartet<A,B,C,java.util.Optional<D>> withNullable(A a, B b, C c, D d)
public static <A extends com.google.protobuf.Message,B extends com.google.protobuf.Message,C extends com.google.protobuf.Message,D extends com.google.protobuf.Message> Quartet<A,B,java.util.Optional<C>,java.util.Optional<D>> withNullable2(A a, B b, C c, D d)
public static <A extends com.google.protobuf.Message,B extends com.google.protobuf.Message,C extends com.google.protobuf.Message,D extends com.google.protobuf.Message> Quartet<A,java.util.Optional<B>,java.util.Optional<C>,java.util.Optional<D>> withNullable3(A a, B b, C c, D d)
public A getA()
public B getB()
public C getC()
public D getD()