Enum Class ERROR_CODE

java.lang.Object
java.lang.Enum<ERROR_CODE>
jsonvalues.spec.ERROR_CODE
All Implemented Interfaces:
Serializable, Comparable<ERROR_CODE>, Constable

public enum ERROR_CODE extends Enum<ERROR_CODE>
The `ERROR_CODE` enum represents various code codes that can be associated with validation errors when using JSON value specifications (`JsSpecs`). Each code corresponds to a specific type of validation failure.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Indicates that an array size is greater than the specified maximum length.
    Indicates that an array size is lower than the specified minimum length.
    Represents a failed condition for an array value.
    Indicates that an array value was expected but a different type of value was encountered.
    Represents a failed condition for a binary (byte array) value.
    Indicates that a binary (byte array) value was expected but a different type of value was encountered.
    Indicates that a binary (byte array) value of a specified size was expected.
    Represents a failed condition for a boolean value.
    Indicates that a boolean value was expected but a different type of value was encountered.
    Represents a failed condition for a constant value.
    Represents a failed condition for a decimal number value.
    Indicates that a decimal number value was expected but a different type of value was encountered.
    Represents a failed condition for a double value.
    Indicates that a double number value was expected but a different type of value was encountered.
    A value from an enumeration is expected
    Indicates that a `false` boolean value was expected but a different boolean value was encountered.
    Represents a failed condition for an instant (date/time) value.
    Indicates that an instant (date/time) value was expected but a different type of value was encountered.
    Represents a failed condition for an integer value.
    Indicates that an integer value was expected but a different type of value was encountered.
    Represents a failed condition for an integral number (integer or long).
    Indicates that an integral number (integer or long) was expected but a different type of value was encountered.
    Represents a failed condition for a long integer value.
    Indicates that a long integer value was expected but a different type of value was encountered.
    Indicates that a `null` value was expected but a non-null value was encountered.
    Indicates that a `null` value was encountered.
    Represents a failed condition for a numeric value.
    Indicates that a numeric value was expected but a different type of value was encountered.
    Represents a failed condition for an object value.
    Indicates that an object (JSON object) value was expected but a different type of value was encountered.
    All the specs from the `OneOf` spec was tried but the value doesn't confirm none of them
    Indicates that a required value is missing.
    Indicates that a specification is missing for validation.
    Represents a failed condition for a string value.
    Indicates that a string value was expected but a different type of value was encountered.
    Indicates that a `true` boolean value was expected but a different boolean value was encountered.
    Represents a failed condition for a generic JSON value.
  • Method Summary

    Modifier and Type
    Method
    Description
    static ERROR_CODE
    Returns the enum constant of this class with the specified name.
    static ERROR_CODE[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • STRING_EXPECTED

      public static final ERROR_CODE STRING_EXPECTED
      Indicates that a string value was expected but a different type of value was encountered.
    • STRING_CONDITION

      public static final ERROR_CODE STRING_CONDITION
      Represents a failed condition for a string value.
    • INT_EXPECTED

      public static final ERROR_CODE INT_EXPECTED
      Indicates that an integer value was expected but a different type of value was encountered.
    • BINARY_EXPECTED

      public static final ERROR_CODE BINARY_EXPECTED
      Indicates that a binary (byte array) value was expected but a different type of value was encountered.
    • BINARY_FIXED_LENGTH_EXPECTED

      public static final ERROR_CODE BINARY_FIXED_LENGTH_EXPECTED
      Indicates that a binary (byte array) value of a specified size was expected.
    • INSTANT_EXPECTED

      public static final ERROR_CODE INSTANT_EXPECTED
      Indicates that an instant (date/time) value was expected but a different type of value was encountered.
    • INT_CONDITION

      public static final ERROR_CODE INT_CONDITION
      Represents a failed condition for an integer value.
    • LONG_EXPECTED

      public static final ERROR_CODE LONG_EXPECTED
      Indicates that a long integer value was expected but a different type of value was encountered.
    • DOUBLE_EXPECTED

      public static final ERROR_CODE DOUBLE_EXPECTED
      Indicates that a double number value was expected but a different type of value was encountered.
    • LONG_CONDITION

      public static final ERROR_CODE LONG_CONDITION
      Represents a failed condition for a long integer value.
    • DOUBLE_CONDITION

      public static final ERROR_CODE DOUBLE_CONDITION
      Represents a failed condition for a double value.
    • BOOLEAN_EXPECTED

      public static final ERROR_CODE BOOLEAN_EXPECTED
      Indicates that a boolean value was expected but a different type of value was encountered.
    • BOOLEAN_CONDITION

      public static final ERROR_CODE BOOLEAN_CONDITION
      Represents a failed condition for a boolean value.
    • INTEGRAL_EXPECTED

      public static final ERROR_CODE INTEGRAL_EXPECTED
      Indicates that an integral number (integer or long) was expected but a different type of value was encountered.
    • INTEGRAL_CONDITION

      public static final ERROR_CODE INTEGRAL_CONDITION
      Represents a failed condition for an integral number (integer or long).
    • DECIMAL_EXPECTED

      public static final ERROR_CODE DECIMAL_EXPECTED
      Indicates that a decimal number value was expected but a different type of value was encountered.
    • DECIMAL_CONDITION

      public static final ERROR_CODE DECIMAL_CONDITION
      Represents a failed condition for a decimal number value.
    • TRUE_EXPECTED

      public static final ERROR_CODE TRUE_EXPECTED
      Indicates that a `true` boolean value was expected but a different boolean value was encountered.
    • FALSE_EXPECTED

      public static final ERROR_CODE FALSE_EXPECTED
      Indicates that a `false` boolean value was expected but a different boolean value was encountered.
    • OBJ_EXPECTED

      public static final ERROR_CODE OBJ_EXPECTED
      Indicates that an object (JSON object) value was expected but a different type of value was encountered.
    • OBJ_CONDITION

      public static final ERROR_CODE OBJ_CONDITION
      Represents a failed condition for an object value.
    • BINARY_CONDITION

      public static final ERROR_CODE BINARY_CONDITION
      Represents a failed condition for a binary (byte array) value.
    • ARRAY_EXPECTED

      public static final ERROR_CODE ARRAY_EXPECTED
      Indicates that an array value was expected but a different type of value was encountered.
    • ARRAY_CONDITION

      public static final ERROR_CODE ARRAY_CONDITION
      Represents a failed condition for an array value.
    • NUMBER_EXPECTED

      public static final ERROR_CODE NUMBER_EXPECTED
      Indicates that a numeric value was expected but a different type of value was encountered.
    • NUMBER_CONDITION

      public static final ERROR_CODE NUMBER_CONDITION
      Represents a failed condition for a numeric value.
    • INSTANT_CONDITION

      public static final ERROR_CODE INSTANT_CONDITION
      Represents a failed condition for an instant (date/time) value.
    • NULL_NOT_EXPECTED

      public static final ERROR_CODE NULL_NOT_EXPECTED
      Indicates that a `null` value was encountered.
    • NULL_EXPECTED

      public static final ERROR_CODE NULL_EXPECTED
      Indicates that a `null` value was expected but a non-null value was encountered.
    • REQUIRED

      public static final ERROR_CODE REQUIRED
      Indicates that a required value is missing.
    • VALUE_CONDITION

      public static final ERROR_CODE VALUE_CONDITION
      Represents a failed condition for a generic JSON value.
    • SPEC_MISSING

      public static final ERROR_CODE SPEC_MISSING
      Indicates that a specification is missing for validation.
    • CONSTANT_CONDITION

      public static final ERROR_CODE CONSTANT_CONDITION
      Represents a failed condition for a constant value.
    • ARR_SIZE_LOWER_THAN_MIN

      public static final ERROR_CODE ARR_SIZE_LOWER_THAN_MIN
      Indicates that an array size is lower than the specified minimum length.
    • ARR_SIZE_GREATER_THAN_MAX

      public static final ERROR_CODE ARR_SIZE_GREATER_THAN_MAX
      Indicates that an array size is greater than the specified maximum length.
    • ENUM_SYMBOL_EXPECTED

      public static final ERROR_CODE ENUM_SYMBOL_EXPECTED
      A value from an enumeration is expected
    • ONE_OF_SPEC_EXHAUSTED

      public static final ERROR_CODE ONE_OF_SPEC_EXHAUSTED
      All the specs from the `OneOf` spec was tried but the value doesn't confirm none of them
  • Method Details

    • values

      public static ERROR_CODE[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ERROR_CODE valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null