Class Format

    • Field Detail

      • TEXT

        public static Format TEXT
        Inventory is printed in plain text format.
      • HTML

        public static Format HTML
        Inventory is printed in HTML format.

        Technically the output is expected to be an HTML fragment which is intended to be inserted into any block element, such as <div>, within a HTML <body>.

      • JSON

        public static Format JSON
        Inventory is printed in JSON format.

        The output is expected to be a valid JSON object. That is, the output must start with an opening curly brace ({) and end with a closing curly brace (}).

    • Method Detail

      • valueOf

        public static Format valueOf​(String format)
        Converts the given format string into an instance of this class.
        Parameters:
        format - The string value to be converted into a Format.
        Returns:
        One of the defined Format constants or null.
      • toString

        public String toString()
        Returns the string value of this format.
        Overrides:
        toString in class Object