Enum Option

    • Enum Constant Detail

      • TREATING_NULL_AS_ABSENT

        public static final Option TREATING_NULL_AS_ABSENT
        Treats null nodes in actual value as absent. In other words if you expect {"test":{"a":1}} this {"test":{"a":1, "b": null}} will pass the test. When using within ConfigurationWhen.then(Option, Option...), exact path to such nodes should be passed, which is test.b in the example above.
      • IGNORING_ARRAY_ORDER

        public static final Option IGNORING_ARRAY_ORDER
        When comparing arrays, ignores array order. In other words, treats arrays as sets.
      • IGNORING_EXTRA_ARRAY_ITEMS

        public static final Option IGNORING_EXTRA_ARRAY_ITEMS
        Passes even if array in compared document has more items than expected. Items are taken from the beginning of the expected array unless IGNORING_ARRAY_ORDER is specified.
      • COMPARING_ONLY_STRUCTURE

        @Deprecated
        public static final Option COMPARING_ONLY_STRUCTURE
        Deprecated.
        Use IGNORING_VALUES option instead
        Compares only structures. Completely ignores both values and types. Is too lenient, ignores types, prefer IGNORING_VALUES instead.
    • Method Detail

      • values

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

        public static Option 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