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

Change-Id: I4eca94928d77a15a81678dcd91b8d6174b4f6ec3
This commit is contained in:
Dave Borowitz
2016-09-20 15:06:08 -04:00
parent eed3ed3b1a
commit a62dc20d7f
10 changed files with 50 additions and 130 deletions

View File

@@ -17,6 +17,7 @@ package com.google.gerrit.server.project;
import static com.google.gerrit.common.data.PermissionRule.Action.ALLOW;
import static java.nio.charset.StandardCharsets.UTF_8;
import com.google.common.collect.FluentIterable;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
@@ -365,8 +366,8 @@ public class ProjectState {
* from the immediate parent of this project and progresses up the
* hierarchy to All-Projects.
*/
public Iterable<ProjectState> parents() {
return Iterables.skip(tree(), 1);
public FluentIterable<ProjectState> parents() {
return FluentIterable.from(tree()).skip(1);
}
public boolean isAllProjects() {