Class PredicateItemProcessor<T>

java.lang.Object
com.redis.riot.core.PredicateItemProcessor<T>
Type Parameters:
T -
All Implemented Interfaces:
org.springframework.batch.item.ItemProcessor<T,T>

public class PredicateItemProcessor<T> extends Object implements org.springframework.batch.item.ItemProcessor<T,T>
ItemProcessor that only keeps items that match the given predicate., i.e. a given item is kept only if predicate.test(item) == true.
  • Constructor Details

    • PredicateItemProcessor

      public PredicateItemProcessor(Predicate<T> predicate)
  • Method Details

    • process

      public T process(T item) throws Exception
      Specified by:
      process in interface org.springframework.batch.item.ItemProcessor<T,T>
      Throws:
      Exception