public interface Enum<T> extends Supplier<T>, Serializable
| Modifier and Type | Interface and Description |
|---|---|
static class |
Enum.Avro |
static class |
Enum.NativeImpl |
static class |
Enum.Protobuf |
static class |
Enum.Thrift |
| Modifier and Type | Method and Description |
|---|---|
static Enum.Avro |
avro(CharSequence str)
Returns enum instance for the given label, defaults to first enum value.
|
static Enum.Avro |
avro(Enum<?> instance)
Returns enum instance for the given Enum.
|
static Enum.Avro |
avro(EnumAvro instance)
Returns enum instance for the given Avro enum.
|
static Enum.Avro |
avro(int ordinal)
Returns enum instance for the given ordinal, defaults to first enum value.
|
T |
get()
Returns underlying object.
|
static Class<EnumAvro> |
getAvroClass()
Returns Avro enum class.
|
static Schema |
getAvroSchema()
Returns Avro enum schema.
|
default int |
getOrdinal()
Returns enumeration ordinal.
|
static Class<NestedProtobuf.Enum> |
getProtobufClass()
Returns Protobuf class for this enum.
|
static com.google.protobuf.Descriptors.EnumDescriptor |
getProtobufDescriptor()
Returns Protobuf descriptor for this enum.
|
static Class<NestedProtobuf> |
getProtobufProtocolClass()
Returns Protobuf protocol class for this enum.
|
static com.google.protobuf.Descriptors.FileDescriptor |
getProtobufProtocolDescriptor()
Returns Protobuf protocol descriptor for this enum.
|
static Class<EnumThrift> |
getThriftClass()
Returns Thrift class for this enum.
|
default boolean |
isOff() |
default boolean |
isOn() |
static Enum.NativeImpl |
nativeImpl(CharSequence str)
Returns enum instance for the given label, defaults to first enum value.
|
static Enum.NativeImpl |
nativeImpl(Enum<?> instance)
Returns enum instance for the given Enum.
|
static Enum.NativeImpl |
nativeImpl(int ordinal)
Returns enum instance for the given ordinal, defaults to first enum value.
|
static Enum.Protobuf |
protobuf(CharSequence str)
Returns enum instance for the given label, defaults to first enum value.
|
static Enum.Protobuf |
protobuf(Enum<?> instance)
Returns enum instance for the given Enum.
|
static Enum.Protobuf |
protobuf(int ordinal)
Returns enum instance for the given ordinal, defaults to first enum value.
|
static Enum.Protobuf |
protobuf(NestedProtobuf.Enum instance)
Returns enum instance for the given Protobuf enum.
|
static Enum.Thrift |
thrift(CharSequence str)
Returns enum instance for the given label, defaults to first enum value.
|
static Enum.Thrift |
thrift(Enum<?> instance)
Returns enum instance for the given Enum.
|
static Enum.Thrift |
thrift(EnumThrift instance)
Returns enum instance for the given Thrift enum.
|
static Enum.Thrift |
thrift(int ordinal)
Returns enum instance for the given ordinal, defaults to first enum value.
|
default int getOrdinal()
default boolean isOff()
default boolean isOn()
static Enum.NativeImpl nativeImpl(Enum<?> instance)
static Enum.NativeImpl nativeImpl(int ordinal)
static Enum.NativeImpl nativeImpl(CharSequence str)
static Enum.Avro avro(int ordinal)
static Enum.Avro avro(CharSequence str)
static Schema getAvroSchema()
static Enum.Protobuf protobuf(Enum<?> instance)
static Enum.Protobuf protobuf(NestedProtobuf.Enum instance)
static Enum.Protobuf protobuf(int ordinal)
static Enum.Protobuf protobuf(CharSequence str)
static Class<NestedProtobuf.Enum> getProtobufClass()
static Class<NestedProtobuf> getProtobufProtocolClass()
static com.google.protobuf.Descriptors.EnumDescriptor getProtobufDescriptor()
static com.google.protobuf.Descriptors.FileDescriptor getProtobufProtocolDescriptor()
static Enum.Thrift thrift(Enum<?> instance)
static Enum.Thrift thrift(EnumThrift instance)
static Enum.Thrift thrift(int ordinal)
static Enum.Thrift thrift(CharSequence str)
static Class<EnumThrift> getThriftClass()
Copyright © 2013–2016 AdGear Technologies Inc.. All rights reserved.