/** * Create a new Predicate that returns true if the specified predicate * returns false and vice versa. * * @see org.apache.commons.collections.functors.NotPredicate * * @param predicate the predicate to not * @return the <code>not</code> predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate notPredicate(Predicate predicate) { return NotPredicate.getInstance(predicate); }
/** * Factory to create the not predicate. * * @param predicate the predicate to decorate, not null * @return the predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate getInstance(Predicate predicate) { if (predicate == null) { throw new IllegalArgumentException("Predicate must not be null"); } return new NotPredicate(predicate); }
void visit(NotPredicate p) throws IOException { Assert.isTrue(p.getPredicates().length == 1); append("! ("); doVisit(p.getPredicates()[0]); append(')'); }
/** * Create a new Predicate that returns true if the specified predicate * returns false and vice versa. * * @see org.apache.commons.collections.functors.NotPredicate * * @param predicate the predicate to not * @return the <code>not</code> predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate notPredicate(Predicate predicate) { return NotPredicate.getInstance(predicate); }
/** * Factory to create the not predicate. * * @param predicate the predicate to decorate, not null * @return the predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate getInstance(Predicate predicate) { if (predicate == null) { throw new IllegalArgumentException("Predicate must not be null"); } return new NotPredicate(predicate); }
/** * Create a new Predicate that returns true if the specified predicate * returns false and vice versa. * * @see org.apache.commons.collections.functors.NotPredicate * * @param predicate the predicate to not * @return the <code>not</code> predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate notPredicate(Predicate predicate) { return NotPredicate.getInstance(predicate); }
/** * Factory to create the not predicate. * * @param predicate the predicate to decorate, not null * @return the predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate getInstance(Predicate predicate) { if (predicate == null) { throw new IllegalArgumentException("Predicate must not be null"); } return new NotPredicate(predicate); }
/** * Create a new Predicate that returns true if the specified predicate * returns false and vice versa. * * @see org.apache.commons.collections.functors.NotPredicate * * @param predicate the predicate to not * @return the <code>not</code> predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate notPredicate(Predicate predicate) { return NotPredicate.getInstance(predicate); }
/** * Factory to create the not predicate. * * @param predicate the predicate to decorate, not null * @return the predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate getInstance(Predicate predicate) { if (predicate == null) { throw new IllegalArgumentException("Predicate must not be null"); } return new NotPredicate(predicate); }
/** * Create a new Predicate that returns true if the specified predicate * returns false and vice versa. * * @see org.apache.commons.collections.functors.NotPredicate * * @param predicate the predicate to not * @return the <code>not</code> predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate notPredicate(Predicate predicate) { return NotPredicate.getInstance(predicate); }
/** * Factory to create the not predicate. * * @param predicate the predicate to decorate, not null * @return the predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate getInstance(Predicate predicate) { if (predicate == null) { throw new IllegalArgumentException("Predicate must not be null"); } return new NotPredicate(predicate); }
/** * Create a new Predicate that returns true if the specified predicate * returns false and vice versa. * * @see org.apache.commons.collections.functors.NotPredicate * * @param predicate the predicate to not * @return the <code>not</code> predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate notPredicate(Predicate predicate) { return NotPredicate.getInstance(predicate); }
/** * Factory to create the not predicate. * * @param predicate the predicate to decorate, not null * @return the predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate getInstance(Predicate predicate) { if (predicate == null) { throw new IllegalArgumentException("Predicate must not be null"); } return new NotPredicate(predicate); }
/** * Create a new Predicate that returns true if the specified predicate * returns false and vice versa. * * @see org.apache.commons.collections.functors.NotPredicate * * @param predicate the predicate to not * @return the <code>not</code> predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate notPredicate(Predicate predicate) { return NotPredicate.getInstance(predicate); }
/** * Factory to create the not predicate. * * @param predicate the predicate to decorate, not null * @return the predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate getInstance(Predicate predicate) { if (predicate == null) { throw new IllegalArgumentException("Predicate must not be null"); } return new NotPredicate(predicate); }
public WalkDepthFirstSearch() { this.edgePredicate = NotPredicate.getInstance( new EdgeDisabledPredicate() ); }
predicates.add(new NotPredicate(getSuperTypePredicate(notSupertype))); predicates.add(new NotPredicate(getNamePredicate(notName)));
public WalkBreadthFirstSearch() { this.edgePredicate = NotPredicate.getInstance( new EdgeDisabledPredicate() ); }
public static Predicate getPredicateFromSearchFilter(SearchFilter searchFilter) { List<Predicate> predicates = new ArrayList<>(); final String type = searchFilter.getParam(SearchFilter.PARAM_TYPE); final String name = searchFilter.getParam(SearchFilter.PARAM_NAME); final String supertype = searchFilter.getParam(SearchFilter.PARAM_SUPERTYPE); final String notSupertype = searchFilter.getParam(SearchFilter.PARAM_NOT_SUPERTYPE); // Add filter for the type/category if (StringUtils.isNotBlank(type)) { predicates.add(getTypePredicate(type)); } // Add filter for the name if (StringUtils.isNotBlank(name)) { predicates.add(getNamePredicate(name)); } // Add filter for the supertype if (StringUtils.isNotBlank(supertype)) { predicates.add(getSuperTypePredicate(supertype)); } // Add filter for the supertype negation if (StringUtils.isNotBlank(notSupertype)) { predicates.add(new NotPredicate(getSuperTypePredicate(notSupertype))); } return PredicateUtils.allPredicate(predicates); }
final public Predicate not(Function fieldFunction) throws ParseException { Predicate predicate = null; jj_consume_token(NOT); predicate = expression(fieldFunction); { if (true) return NotPredicate.getInstance(predicate); } throw new Error("Missing return statement in function"); }