Beispiel #1
0
 @Override
 public Coll via(def<R> method) {
   $(iterable)
       .forEach(
           e -> {
             collection.add(method.apply(e));
           });
   return collection;
 }
Beispiel #2
0
 @Override
 public <Coll extends Collection<T>> Coll findAll(def<Boolean> filter, Coll toColl, int limit) {
   return $(iterable)
       .to(toColl)
       .via(
           e -> {
             Boolean ret = filter.apply(e);
             if (null == ret || ret.equals(false)) Continue();
             if (limit > 0 && limit <= toColl.size()) {
               Break();
             }
             return e;
           });
 }