Enum ParameterType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ParameterType>

    public enum ParameterType
    extends java.lang.Enum<ParameterType>
    The types that parameters can be.
    • Enum Constant Detail

      • STRING

        public static final ParameterType STRING
        A "string" parameter type.
      • BOOLEAN

        public static final ParameterType BOOLEAN
        A "boolean" parameter type.
    • Method Detail

      • values

        public static ParameterType[] 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 (ParameterType c : ParameterType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ParameterType 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 name
        java.lang.NullPointerException - if the argument is null
      • fromNode

        public static ParameterType fromNode​(StringNode node)
                                      throws RuleError
        Creates a ParameterType of a specific type from the given Node information.
        Parameters:
        node - the node to deserialize.
        Returns:
        the created ParameterType.
        Throws:
        RuleError - when the value is not a valid ParameterType.
      • fromNode

        public static ParameterType fromNode​(Node node)
                                      throws RuleError
        Creates a ParameterType of a specific type from the given Node type.
        Parameters:
        node - the node to deserialize.
        Returns:
        the created ParameterType.
        Throws:
        RuleError - when the node would not create a valid ParameterType.
      • fromType

        public static ParameterType fromType​(Type type)
        Creates a ParameterType of a specific type from the given parameter Type.
        Parameters:
        type - the Type to create from.
        Returns:
        the created ParameterType.
        Throws:
        java.lang.RuntimeException - when the value would not create a valid ParameterType.
      • fromShapeType

        public static ParameterType fromShapeType​(ShapeType type)
        Creates a ParameterType of a specific type from the given ShapeType.
        Parameters:
        type - the ShapeType to create from.
        Returns:
        the created ParameterType.
        Throws:
        java.lang.RuntimeException - when the value would not create a valid ParameterType.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<ParameterType>