Made Array#selectFrom() be consistent with select()
@@ -525,13 +525,14 @@ public class Array<T> implements Iterable<T>{
Sort.instance().sort(items, comparator, 0, size);
}
- public void selectFrom(Array<T> base, Predicate<T> predicate){
+ public Array<T> selectFrom(Array<T> base, Predicate<T> predicate){
clear();
base.each(t -> {
if(predicate.test(t)){
add(t);
}
});
+ return this;
}
/** Allocates a new array with all elements that match the predicate.*/
