Interface IValueAcceptanceCriteria


public interface IValueAcceptanceCriteria
Interface for defining acceptance criteria for values, used by IValueDescriptor.acceptsValue(Object, IValueAcceptanceCriteria).
Since:
8.5.0
  • Method Details

    • allowExtraneousRecordFields

      boolean allowExtraneousRecordFields()
      Controls whether extraneous fields in records are allowed that are not defined in the record descriptor.
      Returns:
      true if extraneous fields are allowed, false otherwise.
    • allowExtraneousTupleElements

      boolean allowExtraneousTupleElements()
      Controls whether extraneous elements in tuples are allowed, i.e. values at indices larger than the highest index defined in the tuple descriptor.
      Returns:
      true if extraneous elements are allowed, false otherwise.
    • allowExtraneousVoidValues

      boolean allowExtraneousVoidValues()
      Whether to allow values for void descriptors. Void values must not have any value, i.e. must be null. This criterion controls whether such values are accepted or rejected.
      Returns:
      true if void values are accepted, false otherwise.
    • allowMismatchingConst

      boolean allowMismatchingConst()
      Controls whether constant values in constants are allowed to mismatch the defined constant value. Also applies to INullValueDescriptor, which is a constant null value.
      Returns:
      true if mismatching constants are allowed, false otherwise.
    • allowMissingRequiredRecordFields

      boolean allowMissingRequiredRecordFields()
      Controls whether records are allowed to have missing fields that are marked as required in the record descriptor.
      Returns:
      true if missing required fields are allowed, false otherwise.
    • allowMissingTupleElements

      boolean allowMissingTupleElements()
      Controls whether tuples are allowed to have fewer elements than defined in the tuple descriptor.
      Returns:
      true if missing fields are allowed, false otherwise.
    • allowNonStringKeys

      boolean allowNonStringKeys()
      The keys of maps and records must be strings. This criterion controls whether non-string keys are ignored when checking for conformance.
      Returns:
      true if non-string keys are allowed, false otherwise.
    • enableLargeStringInteroperability

      boolean enableLargeStringInteroperability()
      When true, String and LargeString are treated as equivalent types for the purpose of value acceptance. This allows, for example, a IStringValueDescriptor to accept a LargeString value.
      Returns:
      true if interoperability is enabled, false otherwise.
    • enforceListItemConformance

      boolean enforceListItemConformance()
      Controls whether each item in lists must conform to the defined item value descriptor.
      Returns:
      true if each item must conform, false otherwise.
    • enforceListLengthLowerBound

      boolean enforceListLengthLowerBound()
      Controls whether the length of list is enforced to not contain fewer items than the defined minimum length of the list.
      Returns:
      true if the list length lower bound is enforced, false otherwise.
    • enforceListLengthUpperBound

      boolean enforceListLengthUpperBound()
      Controls whether the length of lists is enforced to not contain more items than the defined maximum length of the list.
      Returns:
      true if the list length upper bound is enforced, false otherwise.
    • enforceMapValueConformance

      boolean enforceMapValueConformance()
      Controls whether each value in maps must conform to the defined value descriptor.
      Returns:
      true if each value must conform, false otherwise.
    • enforceNumberRange

      boolean enforceNumberRange()
      Controls whether the value of integers and floats is enforced to be within the defined minimum and maximum value of the number.
      Returns:
      true if the number range is enforced, false otherwise.
    • enforceRecordOptionalFieldValueConformance

      boolean enforceRecordOptionalFieldValueConformance()
      Controls whether each optional field in records must conform to the defined value descriptor.
      Returns:
      true if each optional field must conform, false otherwise.
    • enforceRecordRequiredFieldValueConformance

      boolean enforceRecordRequiredFieldValueConformance()
      Controls whether each required field in records must conform to the defined value descriptor.
      Returns:
      true if each required field must conform, false otherwise.
    • enforceStringLengthLowerBound

      boolean enforceStringLengthLowerBound()
      Controls whether the length of strings is enforced to not be shorter than the defined minimum length of the string.
      Returns:
      true if the list length lower bound is enforced, false otherwise.
    • enforceStringLengthUpperBound

      boolean enforceStringLengthUpperBound()
      Controls whether the length of strings is enforced to not be longer than the defined maximum length of the string.
      Returns:
      true if the list length upper bound is enforced, false otherwise.
    • enforceTupleElementConformance

      boolean enforceTupleElementConformance()
      Controls whether each element in tuples must conform to the defined value descriptor at the respective index.
      Returns:
      true if each element must conform, false otherwise.
    • typeCoercer

      An optional coercer that attempts to coerce values to their expected type. For example, a floating-point number may be coerced to an integer by truncating the decimal part; or a string representing a number may be coerced to an actual numeric type.
      Returns:
      The coercer to use, or null to disable type coercion.