Java 类org.apache.commons.collections.functors.TruePredicate 实例源码

项目:clickwatch    文件:CollectionFactory.java   
protected List buildBackingCollection(Collection c, Predicate p, Comparator comp)
{
    List new_backing_collection = new ArrayList(c.size());

    if (p != null && p != TruePredicate.getInstance())
    {
        for (Iterator iter = c.iterator(); iter.hasNext(); )
        {
            Object o = iter.next();
            if (p.evaluate(o))
                new_backing_collection.add(o);
        }
    }

    if (comp != null)
        Collections.sort(new_backing_collection, comp);

    return new_backing_collection;
}
项目:read-open-source-code    文件:KeyValueSet.java   
/**
 * Walk entries.
 * 
 * @param handler
 *            handler to call.
 * @throws IllegalArgumentException
 *             if handler is null.
 */
public void walk(final Closure handler) throws IllegalArgumentException {
    this.walk(handler, TruePredicate.INSTANCE);
}
项目:kettle-4.4.0-stable    文件:KeyValueSet.java   
/**
 * Walk entries.
 * 
 * @param handler
 *            handler to call.
 * @throws IllegalArgumentException
 *             if handler is null.
 */
public void walk(final Closure handler) throws IllegalArgumentException {
    this.walk(handler, TruePredicate.INSTANCE);
}
项目:kettle-trunk    文件:KeyValueSet.java   
/**
 * Walk entries.
 * 
 * @param handler
 *            handler to call.
 * @throws IllegalArgumentException
 *             if handler is null.
 */
public void walk(final Closure handler) throws IllegalArgumentException {
    this.walk(handler, TruePredicate.INSTANCE);
}
项目:pentaho-kettle    文件:KeyValueSet.java   
/**
 * Walk entries.
 *
 * @param handler
 *          handler to call.
 * @throws IllegalArgumentException
 *           if handler is null.
 */
public void walk( final Closure handler ) throws IllegalArgumentException {
  this.walk( handler, TruePredicate.INSTANCE );
}