Annotation Interface Values


@Retention(RUNTIME) @Documented public @interface Values
Defines a predicate that matches certain values of a simple field.

A field value matches if it matches any of nulls(), nonNulls(), ranges() or value() properties match the value.

To match all field values, combine nulls() with nonNulls(). For primitive field types, nulls() is irrelevant and ignored, so nonNulls() by itself matches all values.

It is an error to combine nonNulls() with value(), as that would be redundant.

See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Specify whether any non-null value should match.
    boolean
    Specify whether the null value should match.
    Specify range(s) of field values that should match.
    Enumerate specific field value(s) that should match.
  • Element Details

    • nulls

      boolean nulls
      Specify whether the null value should match.
      Default:
      false
    • nonNulls

      boolean nonNulls
      Specify whether any non-null value should match.
      Default:
      false
    • value

      String[] value
      Enumerate specific field value(s) that should match.

      Each value must be a valid String encoding of the associated field, acceptable to Encoding.fromString().

      Returns:
      specific matching field values
      Default:
      {}
    • ranges

      ValueRange[] ranges
      Specify range(s) of field values that should match.
      Returns:
      specific matching field value ranges
      Default:
      {}