A
- the type of the first alternativeB
- the type of the second alternativeC
- the type of the third alternativeD
- the type of the fourth alternativepublic final class EitherOf4<A extends com.google.protobuf.Message,B extends com.google.protobuf.Message,C extends com.google.protobuf.Message,D extends com.google.protobuf.Message> extends Either
Modifier and Type | Method and Description |
---|---|
A |
getA()
Obtains the value of the first alternative.
|
B |
getB()
Obtains the value of the second alternative.
|
C |
getC()
Obtains the value of the third alternative.
|
D |
getD()
Obtains the value of the third alternative.
|
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> |
withA(A a)
Creates a new instance with
<A> 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> |
withB(B b)
Creates a new instance with
<B> 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> |
withC(C c)
Creates a new instance with
<C> 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> |
withD(D d)
Creates a new instance with
<C> value. |
equals, get, hashCode, index, iterator, value
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> EitherOf4<A,B,C,D> withA(A a)
<A>
value.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> EitherOf4<A,B,C,D> withB(B b)
<B>
value.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> EitherOf4<A,B,C,D> withC(C c)
<C>
value.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> EitherOf4<A,B,C,D> withD(D d)
<C>
value.public A getA()
java.lang.IllegalStateException
- if a value of another type is stored instead.public B getB()
java.lang.IllegalStateException
- if a value of another type is stored instead.public C getC()
java.lang.IllegalStateException
- if a value of another type is stored instead.public D getD()
java.lang.IllegalStateException
- if a value of another type is stored instead.