Class MaxonConfigurator


  • public class MaxonConfigurator
    extends Object
    The MaxonConfigurator is used to create a Maxon object with a custom output. By configuring the desired settings and calling buildMaxon() the custom can be constructed.
    • Constructor Detail

      • MaxonConfigurator

        public MaxonConfigurator()
        Instantiates a new MaxonConfigurator.
    • Method Detail

      • toggleTabWhitespace

        public MaxonConfigurator toggleTabWhitespace​(boolean bool)

        If set to true, the default whitespace character will be a tabulator instead of a space.

        The default setting is false

        Parameters:
        bool - true to use tabulator as whitespace character; false to use a space
        Returns:
        itself
      • setWhitespaceQuantity

        public MaxonConfigurator setWhitespaceQuantity​(int qty)

        Sets the quantity of whitespace characters used for one indent when in PrintStyle.PRETTY_PRINTED mode.

        The default setting is 4.

        Parameters:
        qty - the quantity of whitespace characters in one indent
        Returns:
        itself
      • setIgnoreNull

        public MaxonConfigurator setIgnoreNull​(boolean ignoreNull)

        Choose whether or not nulls found in JsonArrays and JsonObjects are to be ignored or not

        The default setting is false.

        Parameters:
        ignoreNull - true if nulls should be ignored; false otherwise
        Returns:
        itself
      • setDateFormatConfiguration

        public MaxonConfigurator setDateFormatConfiguration​(DateFormatConfiguration dateFormatConfiguration)

        Sets the DateFormatConfiguration which defines how date and time objects shall be parsed.

        The default value is new DateFormatConfiguration.

        Parameters:
        dateFormatConfiguration - the date format configuration
        Returns:
        itself
      • buildMaxon

        public Maxon buildMaxon()
        Builds the Maxon with custom configuration.
        Returns:
        the custom Maxon