Interface Predicate<T>

All Known Subinterfaces:
DoublePredicate, FloatPredicate, IntPredicate, LongPredicate
All Known Implementing Classes:
AndPredicate, AnyOfPredicate, CompositePredicate, DoubleAnyOfPredicate, DoubleEqualsPredicate, DoubleGreaterOrEqualsPredicate, DoubleGreaterThanPredicate, DoubleLowerOrEqualsPredicate, DoubleLowerThanPredicate, EqualsPredicate, FloatAnyOfPredicate, FloatEqualsPredicate, FloatGreaterOrEqualsPredicate, FloatGreaterThanPredicate, FloatLowerOrEqualsPredicate, FloatLowerThanPredicate, IntAnyOfPredicate, IntEqualsPredicate, IntGreaterOrEqualsPredicate, IntGreaterThanPredicate, IntLowerOrEqualsPredicate, IntLowerThanPredicate, LongAnyOfPredicate, LongEqualsPredicate, LongGreaterOrEqualsPredicate, LongGreaterThanPredicate, LongLowerOrEqualsPredicate, LongLowerThanPredicate, OrPredicate, RecordFieldProjectionEqualsPredicate

@Experimental public interface Predicate<T>
  • Method Details

    • evaluate

      @Experimental boolean evaluate(T value)
    • isCompatibleWithSchema

      @Experimental default boolean isCompatibleWithSchema(org.apache.avro.Schema schema)
      Checks if this predicate is compatible with the given Avro schema type. This method should be implemented by each predicate type to provide type-specific compatibility logic.
      Parameters:
      schema - The Avro schema to check compatibility against
      Returns:
      true if this predicate is compatible with the schema type
    • and

      @Experimental static <T> Predicate<T> and(Predicate<T>... predicates)
    • or

      @Experimental static <T> Predicate<T> or(Predicate<T>... predicates)
    • anyOf

      @Experimental static <T> Predicate<T> anyOf(T... expectedValues)
    • equalTo

      @Experimental static <O> Predicate<O> equalTo(O expectedValue)
    • equalTo

      @Experimental static Predicate<org.apache.avro.generic.GenericRecord> equalTo(String fieldName, Object expectedValue)