Interface CqnInPredicate

All Superinterfaces:
CqnExpression, CqnPredicate, CqnToken, CqnValue, JSONizable
All Known Subinterfaces:
CqnEtagPredicate

public interface CqnInPredicate extends CqnPredicate
The in predicate tests wether an actual value is equal to any value from a defined value set. It evaluates to false if the value set is empty.
  • Method Details

    • value

      CqnValue value()
      The actual CqnValue that is tested against the values given by valueSet().
      Returns:
      the actual CqnValue
    • values

      default Collection<CqnValue> values()
      Returns the collection of expected values in case valueSet() is a CqnListValue, otherwise a ClassCastException is thrown.
      Returns:
      the expected values
      Throws:
      ClassCastException - if this value is not a CqnListValue
    • valueSet

      CqnValue valueSet()
      Defines the set of expected values the actual value is tested against. The returned CqnValue can either be a CqnListValue containing all expected values, a CqnReference pointing to a collection-valued element, or a CqnParameter pointing to a collection of values.
      Returns:
      the set of expected values
    • accept

      default void accept(CqnVisitor visitor)
      Description copied from interface: CqnToken
      Traverses the expression tree represented by this token with a given visitor. The traversal order is depth-first. If this token has child nodes they are traversed first by dispatching the visitor to the children's accept methods. Afterwards this token is passed to the visitor's visit method specific for this token's type.
      Specified by:
      accept in interface CqnExpression
      Specified by:
      accept in interface CqnToken
      Parameters:
      visitor - the CqnVisitor