Enum FormatOption

    • Enum Constant Detail

      • XML

        public static final FormatOption XML
        Output in XML format
      • MRR

        public static final FormatOption MRR
        Output in MachineReadableReport XML format
      • TEXT

        public static final FormatOption TEXT
        Output in brief format
      • HTML

        public static final FormatOption HTML
        Output in HTML format
      • JSON

        public static final FormatOption JSON
        Output in JSON format
    • Method Detail

      • values

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

        public static FormatOption 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
      • getOption

        public String getOption()
        Returns:
        the option string for the FormatType instance.
      • fromOption

        public static FormatOption fromOption​(String option)
        Performs a match against the parameter String option of each FormatType's option and returns a matching instance. Defaults to returning XML if no match can be made.
        Parameters:
        option - the string CLI option to compare
        Returns:
        a matching FormatType instance or XML if no match can be made.