Enum RgxGenOption

    • Enum Constant Detail

      • INFINITE_PATTERN_REPETITION

        public static final RgxGenOption INFINITE_PATTERN_REPETITION
        For infinite patterns, such as a+, a* and a{n,}, defines limit for the repetitions.
        Default Value:
        100
      • CASE_INSENSITIVE

        public static final RgxGenOption CASE_INSENSITIVE
        Flag to use case insensitive matching.
        Default Value:
        false
    • Method Detail

      • values

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

        public static RgxGenOption 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
      • getKey

        public String getKey()
        Get unique identifier of the property
        Returns:
        unique key
      • getDefault

        public String getDefault()
        Get default value associated with the option
        Returns:
        default value
      • getFromProperties

        public String getFromProperties​(RgxGenProperties properties)
        Get value from the properties object.
        Parameters:
        properties - object to get value from
        Returns:
        value from properties, if present. Default otherwise.
      • setInProperties

        public <T> void setInProperties​(RgxGenProperties properties,
                                        T value)
        Associates value for this option in the properties
        Type Parameters:
        T - type of value
        Parameters:
        properties - properties to add to
        value - a value
      • getIntFromProperties

        public int getIntFromProperties​(RgxGenProperties properties)
        Convenience method. Returns value of the property transformed to an integer
        Parameters:
        properties - properties to get value from
        Returns:
        integer value associated with property, or default.
      • getBooleanFromProperties

        public boolean getBooleanFromProperties​(RgxGenProperties properties)
        Convenience method. Returns value of the property transformed to an integer
        Parameters:
        properties - properties to get value from
        Returns:
        boolean value associated with property, or default.