Package org.intellij.grammar.generator
Enum RuleGraphHelper.Cardinality
- java.lang.Object
-
- java.lang.Enum<RuleGraphHelper.Cardinality>
-
- org.intellij.grammar.generator.RuleGraphHelper.Cardinality
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<RuleGraphHelper.Cardinality>
- Enclosing class:
- RuleGraphHelper
public static enum RuleGraphHelper.Cardinality extends java.lang.Enum<RuleGraphHelper.Cardinality>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANY_NUMBERAT_LEAST_ONENONEOPTIONALREQUIRED
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RuleGraphHelper.Cardinalityand(RuleGraphHelper.Cardinality c)static RuleGraphHelper.CardinalityfromNodeType(com.intellij.psi.tree.IElementType type)booleanmany()booleanoptional()RuleGraphHelper.Cardinalityor(RuleGraphHelper.Cardinality c)RuleGraphHelper.Cardinalitysingle()static RuleGraphHelper.CardinalityvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static RuleGraphHelper.Cardinality[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final RuleGraphHelper.Cardinality NONE
-
OPTIONAL
public static final RuleGraphHelper.Cardinality OPTIONAL
-
REQUIRED
public static final RuleGraphHelper.Cardinality REQUIRED
-
AT_LEAST_ONE
public static final RuleGraphHelper.Cardinality AT_LEAST_ONE
-
ANY_NUMBER
public static final RuleGraphHelper.Cardinality ANY_NUMBER
-
-
Method Detail
-
values
public static RuleGraphHelper.Cardinality[] 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 (RuleGraphHelper.Cardinality c : RuleGraphHelper.Cardinality.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RuleGraphHelper.Cardinality 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
-
optional
public boolean optional()
-
many
public boolean many()
-
single
public RuleGraphHelper.Cardinality single()
-
fromNodeType
public static RuleGraphHelper.Cardinality fromNodeType(com.intellij.psi.tree.IElementType type)
-
and
public RuleGraphHelper.Cardinality and(RuleGraphHelper.Cardinality c)
-
or
public RuleGraphHelper.Cardinality or(RuleGraphHelper.Cardinality c)
-
-