Package org.apache.calcite.util
Enum Optionality
- All Implemented Interfaces:
Serializable
,Comparable<Optionality>
,Constable
Four states that describe whether a particular behavior or
property is allowed and/or not allowed.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA property is forbidden if an instance must not possess it; it is an error if the instance has the property.A property is ignored if an instance may or may not possess it; if it possesses the property, the effect is as if it does not.A property is mandatory if an instance must possess it; it is an error if it does not.A property is optional if an instance may or may not possess it; neither state is an error. -
Method Summary
Modifier and TypeMethodDescriptionstatic Optionality
Returns the enum constant of this type with the specified name.static Optionality[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
MANDATORY
A property is mandatory if an instance must possess it; it is an error if it does not. -
OPTIONAL
A property is optional if an instance may or may not possess it; neither state is an error. -
IGNORED
A property is ignored if an instance may or may not possess it; if it possesses the property, the effect is as if it does not. -
FORBIDDEN
A property is forbidden if an instance must not possess it; it is an error if the instance has the property.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-