@Generated(value="net.morimekta.providence:providence-generator-java", comments="java:serializable") public enum MessageVariant extends Enum<MessageVariant> implements net.morimekta.providence.PEnumValue<MessageVariant>
STRUCT: Normal Structure. UNION: Only one field set to be valid. EXCEPTION: Handled as exception (Java, Python etc.).
Providence Only:
INTERFACE: Not a real type. Only interface. Struct can 'implement' this And will then require to have matching fields. Field ids not allowed.
| Modifier and Type | Class and Description |
|---|---|
static class |
MessageVariant._Builder |
| Modifier and Type | Field and Description |
|---|---|
static net.morimekta.providence.descriptor.PEnumDescriptor<MessageVariant> |
kDescriptor |
| Modifier and Type | Method and Description |
|---|---|
int |
asInteger() |
String |
asString() |
net.morimekta.providence.descriptor.PEnumDescriptor<MessageVariant> |
descriptor() |
static MessageVariant |
findById(Integer id)
Find a value based in its ID
|
static MessageVariant |
findByName(String name)
Find a value based in its name
|
static net.morimekta.providence.descriptor.PEnumDescriptorProvider<MessageVariant> |
provider() |
static MessageVariant |
valueForId(int id)
Get a value based in its ID
|
static MessageVariant |
valueForName(String name)
Get a value based in its name
|
static MessageVariant |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MessageVariant[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfcompareTopublic static final MessageVariant STRUCT
public static final MessageVariant UNION
public static final MessageVariant EXCEPTION
public static final MessageVariant INTERFACE
public static final net.morimekta.providence.descriptor.PEnumDescriptor<MessageVariant> kDescriptor
public static MessageVariant[] values()
for (MessageVariant c : MessageVariant.values()) System.out.println(c);
public static MessageVariant valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int asInteger()
asInteger in interface net.morimekta.util.Numeric@Nonnull public String asString()
asString in interface net.morimekta.util.Stringable@Nullable public static MessageVariant findById(Integer id)
id - Id of value@Nullable public static MessageVariant findByName(String name)
name - Name of value@Nonnull public static MessageVariant valueForId(int id)
id - Id of valueIllegalArgumentException - If no value for id is found@Nonnull public static MessageVariant valueForName(@Nonnull String name)
name - Name of valueIllegalArgumentException - If no value for name is found, or null name@Nonnull public net.morimekta.providence.descriptor.PEnumDescriptor<MessageVariant> descriptor()
descriptor in interface net.morimekta.providence.PEnumValue<MessageVariant>descriptor in interface net.morimekta.providence.PValue<MessageVariant>public static net.morimekta.providence.descriptor.PEnumDescriptorProvider<MessageVariant> provider()
Copyright © 2015–2020 morimekta.net. All rights reserved.