Enum Types.TypeCtr

  • All Implemented Interfaces:
    Serializable, Comparable<Types.TypeCtr>
    Enclosing class:
    Types

    public static enum Types.TypeCtr
    extends Enum<Types.TypeCtr>
    The enum type specifying the different types of constraints and meta-constraints. We use lower-case letters, so as to directly get the names of the elements (no need to define constants or make any transformations).
    • Method Detail

      • values

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

        public static Types.TypeCtr valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • isSliding

        public boolean isSliding()
        Returns true if the element has a sliding nature.
      • isLogical

        public boolean isLogical()
        Returns true if the element has a "direct" logical nature.
      • isControl

        public boolean isControl()
        Returns true if the element has a logical nature corresponding to an if-based control structure.
      • isMeta

        public boolean isMeta()
        Returns true if the element corresponds to a meta-constraint.
      • oneOf

        public boolean oneOf​(Types.TypeCtr... types)
        Returns true iff this type is one of the specified types.
        Parameters:
        types - a sequence of types
        Returns:
        true iff this type is one of the specified types