public CacheSet querySequential(Predicate... selectors){
  checkNotNull(selectors);
  Collection<Object> resultCollection=new ArrayList<>(items);
  Collection<Object> filterCollection=new LinkedList<>();
  Collection<Object> tempCollection;
  int i=0;
  while ((i < selectors.length) && (resultCollection.size() > 0)) {
    CollectionUtils.select(resultCollection,selectors[i],filterCollection);
    tempCollection=resultCollection;
    resultCollection=filterCollection;
    filterCollection=tempCollection;
    filterCollection.clear();
    i++;
  }
  return new CacheSet(resultCollection);
}

public CacheSet querySequential ( Predicate ... selectors ) { checkNotNull ( selectors ) ; Collection < Object > resultCollection = new ArrayList < > ( items ) ; Collection < Object > filterCollection = new LinkedList < > ( ) ; Collection < Object > tempCollection ; int i = 0 ; while ( ( i < selectors . length ) && ( resultCollection . size ( ) > 0 ) ) { CollectionUtils . select ( resultCollection , selectors [ i ] , filterCollection ) ; tempCollection = resultCollection ; resultCollection = filterCollection ; filterCollection = tempCollection ; filterCollection . clear ( ) ; i ++ ; } return new CacheSet ( resultCollection ) ; }
sequential filtering by selectors
