automatically determine which axis a plot needs
This commit is contained in:
@@ -117,6 +117,17 @@ public class CollectionUtils {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static <T> long count(Collection<T> collection, final Compare<T> compare) {
|
||||
long count = 0;
|
||||
for (T t : collection) {
|
||||
boolean found = compare.test(t);
|
||||
if (found ) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public static <V, T extends Collection<V>> T removeAll(final T collection, final T remove,
|
||||
final Supplier<T> generator) {
|
||||
|
||||
Reference in New Issue
Block a user