Package net.morimekta.providence.model
Enum FieldType._Field
- java.lang.Object
-
- java.lang.Enum<FieldType._Field>
-
- net.morimekta.providence.model.FieldType._Field
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<FieldType._Field>,net.morimekta.providence.descriptor.PField
- Enclosing class:
- FieldType
public static enum FieldType._Field extends java.lang.Enum<FieldType._Field> implements net.morimekta.providence.descriptor.PField
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANNOTATIONSDEFAULT_VALUEDOCUMENTATIONEND_POSIDNAMEREQUIREMENTSTART_POSTYPEVALUE_START_POS
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FieldType._FieldfieldForId(int id)static FieldType._FieldfieldForName(java.lang.String name)static FieldType._FieldfindById(int id)static FieldType._FieldfindByName(java.lang.String name)java.lang.ObjectgetDefaultValue()net.morimekta.providence.descriptor.PDescriptorgetDescriptor()intgetId()java.lang.StringgetName()net.morimekta.providence.descriptor.PRequirementgetRequirement()booleanhasDefaultValue()java.lang.StringtoString()static FieldType._FieldvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static FieldType._Field[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DOCUMENTATION
public static final FieldType._Field DOCUMENTATION
-
ID
public static final FieldType._Field ID
-
REQUIREMENT
public static final FieldType._Field REQUIREMENT
-
TYPE
public static final FieldType._Field TYPE
-
NAME
public static final FieldType._Field NAME
-
DEFAULT_VALUE
public static final FieldType._Field DEFAULT_VALUE
-
ANNOTATIONS
public static final FieldType._Field ANNOTATIONS
-
VALUE_START_POS
public static final FieldType._Field VALUE_START_POS
-
START_POS
public static final FieldType._Field START_POS
-
END_POS
public static final FieldType._Field END_POS
-
-
Method Detail
-
values
public static FieldType._Field[] 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 (FieldType._Field c : FieldType._Field.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FieldType._Field 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
-
getId
public int getId()
- Specified by:
getIdin interfacenet.morimekta.providence.descriptor.PField
-
getRequirement
public net.morimekta.providence.descriptor.PRequirement getRequirement()
- Specified by:
getRequirementin interfacenet.morimekta.providence.descriptor.PField
-
getDescriptor
public net.morimekta.providence.descriptor.PDescriptor getDescriptor()
- Specified by:
getDescriptorin interfacenet.morimekta.providence.descriptor.PField
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfacenet.morimekta.providence.descriptor.PField
-
hasDefaultValue
public boolean hasDefaultValue()
- Specified by:
hasDefaultValuein interfacenet.morimekta.providence.descriptor.PField
-
getDefaultValue
public java.lang.Object getDefaultValue()
- Specified by:
getDefaultValuein interfacenet.morimekta.providence.descriptor.PField
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<FieldType._Field>
-
findById
public static FieldType._Field findById(int id)
- Parameters:
id- Field name- Returns:
- The identified field or null
-
findByName
public static FieldType._Field findByName(java.lang.String name)
- Parameters:
name- Field name- Returns:
- The named field or null
-
fieldForId
public static FieldType._Field fieldForId(int id)
- Parameters:
id- Field name- Returns:
- The identified field
- Throws:
java.lang.IllegalArgumentException- If no such field
-
fieldForName
public static FieldType._Field fieldForName(java.lang.String name)
- Parameters:
name- Field name- Returns:
- The named field
- Throws:
java.lang.IllegalArgumentException- If no such field
-
-