class SimplifyingPredicateVisitor implements PredicateVisitor {

  public List<Predicate> getSimplifiedPredicates() {
    if (lastVisited == null) {
      return Collections.emptyList();
    }
    if (lastVisited instanceof OrPredicate) {
      return Arrays.asList(((OrPredicate) lastVisited).getPredicates());
    }
    return Collections.singletonList(lastVisited);
  }

  public  SimplifyingPredicateVisitor(ResourceProvider provider);

}