/** * Factory to create the identity predicate. * * @param object the object to compare to * @return the predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate getInstance(Object object) { if (object == null) { return NullPredicate.INSTANCE; } return new EqualPredicate(object); }
/** * Creates a Predicate that checks if the input object is equal to the * specified object using equals(). * * @see org.apache.commons.collections.functors.EqualPredicate * * @param value the value to compare against * @return the predicate */ public static Predicate equalPredicate(Object value) { return EqualPredicate.getInstance(value); }
/** * Creates a Predicate that checks if the input object is equal to the * specified object using equals(). * * @see org.apache.commons.collections.functors.EqualPredicate * * @param value the value to compare against * @return the predicate */ public static Predicate equalPredicate(Object value) { return EqualPredicate.getInstance(value); }
/** * Factory to create the identity predicate. * * @param object the object to compare to * @return the predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate getInstance(Object object) { if (object == null) { return NullPredicate.INSTANCE; } return new EqualPredicate(object); }
for (Iterator it = objectsAndTransformers.entrySet().iterator(); it.hasNext();) { Map.Entry entry = (Map.Entry) it.next(); preds[i] = EqualPredicate.getInstance(entry.getKey()); trs[i] = (Transformer) entry.getValue(); i++;
/** * Factory to create the identity predicate. * * @param object the object to compare to * @return the predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate getInstance(Object object) { if (object == null) { return NullPredicate.INSTANCE; } return new EqualPredicate(object); }
for (Iterator it = objectsAndClosures.entrySet().iterator(); it.hasNext();) { Map.Entry entry = (Map.Entry) it.next(); preds[i] = EqualPredicate.getInstance(entry.getKey()); trs[i] = (Closure) entry.getValue(); i++;
/** * Factory to create the identity predicate. * * @param object the object to compare to * @return the predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate getInstance(Object object) { if (object == null) { return NullPredicate.INSTANCE; } return new EqualPredicate(object); }
for (Iterator it = objectsAndClosures.entrySet().iterator(); it.hasNext();) { Map.Entry entry = (Map.Entry) it.next(); preds[i] = EqualPredicate.getInstance(entry.getKey()); trs[i] = (Closure) entry.getValue(); i++;
/** * Factory to create the identity predicate. * * @param object the object to compare to * @return the predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate getInstance(Object object) { if (object == null) { return NullPredicate.INSTANCE; } return new EqualPredicate(object); }
for (Iterator it = objectsAndTransformers.entrySet().iterator(); it.hasNext();) { Map.Entry entry = (Map.Entry) it.next(); preds[i] = EqualPredicate.getInstance(entry.getKey()); trs[i] = (Transformer) entry.getValue(); i++;
/** * Factory to create the identity predicate. * * @param object the object to compare to * @return the predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate getInstance(Object object) { if (object == null) { return NullPredicate.INSTANCE; } return new EqualPredicate(object); }
/** * Creates a Predicate that checks if the input object is equal to the * specified object using equals(). * * @see org.apache.commons.collections.functors.EqualPredicate * * @param value the value to compare against * @return the predicate */ public static Predicate equalPredicate(Object value) { return EqualPredicate.getInstance(value); }
/** * Factory to create the identity predicate. * * @param object the object to compare to * @return the predicate * @throws IllegalArgumentException if the predicate is null */ public static Predicate getInstance(Object object) { if (object == null) { return NullPredicate.INSTANCE; } return new EqualPredicate(object); }
/** * Creates a Predicate that checks if the input object is equal to the * specified object using equals(). * * @see org.apache.commons.collections.functors.EqualPredicate * * @param value the value to compare against * @return the predicate */ public static Predicate equalPredicate(Object value) { return EqualPredicate.getInstance(value); }
EqualPredicate nameEqlPredicate = new EqualPredicate(3); BeanPredicate beanPredicate = new BeanPredicate("age", nameEqlPredicate); return CollectionUtils.filter(cats, beanPredicate);
/** * Creates a Predicate that checks if the input object is equal to the * specified object using equals(). * * @see org.apache.commons.collections.functors.EqualPredicate * * @param value the value to compare against * @return the predicate */ public static Predicate equalPredicate(Object value) { return EqualPredicate.getInstance(value); }
Predicate eq = new EqualPredicate(new Object(ID)); FilterIterator filter = new FilterIterator(set.iterator(), eq); Object o = (Object) filter.next();
/** * Creates a Predicate that checks if the input object is equal to the * specified object using equals(). * * @see org.apache.commons.collections.functors.EqualPredicate * * @param value the value to compare against * @return the predicate */ public static Predicate equalPredicate(Object value) { return EqualPredicate.getInstance(value); }
EqualPredicate nameEqlPredicate = new EqualPredicate(functionalName); Object result = CollectionUtils.find(