Package net.morimekta.providence.model
Enum FieldRequirement
- java.lang.Object
-
- java.lang.Enum<FieldRequirement>
-
- net.morimekta.providence.model.FieldRequirement
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<FieldRequirement>,net.morimekta.providence.PEnumValue<FieldRequirement>,net.morimekta.providence.PValue<FieldRequirement>,net.morimekta.util.Numeric,net.morimekta.util.Stringable
@Generated("providence-maven-plugin") public enum FieldRequirement extends java.lang.Enum<FieldRequirement> implements net.morimekta.providence.PEnumValue<FieldRequirement>The requirement of the field.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFieldRequirement._Builder
-
Field Summary
Fields Modifier and Type Field Description static net.morimekta.providence.descriptor.PEnumDescriptor<FieldRequirement>kDescriptor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intasInteger()java.lang.StringasString()net.morimekta.providence.descriptor.PEnumDescriptor<FieldRequirement>descriptor()static FieldRequirementfindById(int id)Find a value based in its IDstatic FieldRequirementfindById(java.lang.Integer id)Find a value based in its IDstatic FieldRequirementfindByName(java.lang.String name)Find a value based in its namestatic net.morimekta.providence.descriptor.PEnumDescriptorProvider<FieldRequirement>provider()static FieldRequirementvalueForId(int id)Get a value based in its IDstatic FieldRequirementvalueForName(java.lang.String name)Get a value based in its namestatic FieldRequirementvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static FieldRequirement[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT
public static final FieldRequirement DEFAULT
-
OPTIONAL
public static final FieldRequirement OPTIONAL
-
REQUIRED
public static final FieldRequirement REQUIRED
-
-
Field Detail
-
kDescriptor
public static final net.morimekta.providence.descriptor.PEnumDescriptor<FieldRequirement> kDescriptor
-
-
Method Detail
-
values
public static FieldRequirement[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (FieldRequirement c : FieldRequirement.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FieldRequirement valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
asInteger
public int asInteger()
- Specified by:
asIntegerin interfacenet.morimekta.util.Numeric
-
asString
@Nonnull public java.lang.String asString()
- Specified by:
asStringin interfacenet.morimekta.util.Stringable
-
findById
public static FieldRequirement findById(int id)
Find a value based in its ID- Parameters:
id- Id of value- Returns:
- Value found or null
-
findById
public static FieldRequirement findById(java.lang.Integer id)
Find a value based in its ID- Parameters:
id- Id of value- Returns:
- Value found or null
-
findByName
public static FieldRequirement findByName(java.lang.String name)
Find a value based in its name- Parameters:
name- Name of value- Returns:
- Value found or null
-
valueForId
@Nonnull public static FieldRequirement valueForId(int id)
Get a value based in its ID- Parameters:
id- Id of value- Returns:
- Value found
- Throws:
java.lang.IllegalArgumentException- If no value for id is found
-
valueForName
@Nonnull public static FieldRequirement valueForName(java.lang.String name)
Get a value based in its name- Parameters:
name- Name of value- Returns:
- Value found
- Throws:
java.lang.IllegalArgumentException- If no value for name is found, or null name
-
descriptor
public net.morimekta.providence.descriptor.PEnumDescriptor<FieldRequirement> descriptor()
- Specified by:
descriptorin interfacenet.morimekta.providence.PEnumValue<FieldRequirement>- Specified by:
descriptorin interfacenet.morimekta.providence.PValue<FieldRequirement>
-
provider
public static net.morimekta.providence.descriptor.PEnumDescriptorProvider<FieldRequirement> provider()
-
-