Convert some Functions/Predicates to streams & lambdas (3)

Change-Id: I04f7aa685352941b2f29975ec42c58f5c5f70822
This commit is contained in:
Dave Borowitz
2016-09-20 10:11:30 -04:00
parent d3848b15a3
commit d39fb04d3f
13 changed files with 103 additions and 207 deletions

View File

@@ -17,7 +17,6 @@ package com.google.gerrit.server.util;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.base.Function;
import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
@@ -94,12 +93,7 @@ public abstract class RegexListSearcher<T> implements Function<T, String> {
return Iterables.filter(
list.subList(begin, end),
new Predicate<T>() {
@Override
public boolean apply(T in) {
return pattern.run(RegexListSearcher.this.apply(in));
}
});
x -> pattern.run(apply(x)));
}
public boolean hasMatch(List<T> list) {