@Nullable @Override public Condition<E> apply(@Nullable Condition<E> cond) { if (cond instanceof Not) { Condition<E> child = ((Not) cond).getChild(); Preconditions.checkArgument(child.getType() == Condition.Type.LITERAL); //verify QNF if (child instanceof PredicateCondition) { PredicateCondition<?, E> pc = (PredicateCondition) child; if (pc.getPredicate().hasNegation()) { return new PredicateCondition(pc.getKey(), pc.getPredicate().negate(), pc.getValue()); } } } return null; } });
@Nullable @Override public Condition<E> apply(@Nullable Condition<E> cond) { if (cond instanceof Not) { Condition<E> child = ((Not) cond).getChild(); Preconditions.checkArgument(child.getType() == Condition.Type.LITERAL); //verify QNF if (child instanceof PredicateCondition) { PredicateCondition<?, E> pc = (PredicateCondition) child; if (pc.getPredicate().hasNegation()) { return new PredicateCondition(pc.getKey(), pc.getPredicate().negate(), pc.getValue()); } } } return null; } });
@Nullable @Override public Condition<E> apply(@Nullable Condition<E> cond) { if (cond instanceof Not) { Condition<E> child = ((Not) cond).getChild(); Preconditions.checkArgument(child.getType() == Condition.Type.LITERAL); //verify QNF if (child instanceof PredicateCondition) { PredicateCondition<?, E> pc = (PredicateCondition) child; if (pc.getPredicate().hasNegation()) { return new PredicateCondition(pc.getKey(), pc.getPredicate().negate(), pc.getValue()); } } } return null; } });