IncrementalRelativeFileSets { public static int getBaseDirectoryCount(@NonNull ImmutableMap<RelativeFile, FileStatus> set) { return Sets.newHashSet( Iterables.filter( Iterables.transform( set.keySet(), RelativeFile.EXTRACT_BASE), Files.isDirectory())) .size(); } private  IncrementalRelativeFileSets(); @NonNull static ImmutableMap<RelativeFile, FileStatus> fromDirectory(@NonNull File directory); @NonNull static ImmutableMap<RelativeFile, FileStatus> fromZip(@NonNull File zip); @NonNull static ImmutableMap<RelativeFile, FileStatus> fromZip(@NonNull File zip,
            FileStatus status); @NonNull static ImmutableMap<RelativeFile, FileStatus> fromZip(@NonNull File zip,
            @NonNull FileCacheByPath cache); @NonNull static ImmutableMap<RelativeFile, FileStatus> union(
            @NonNull Iterable<ImmutableMap<RelativeFile, FileStatus>> sets); static int getBaseDirectoryCount(@NonNull ImmutableMap<RelativeFile, FileStatus> set); @NonNull static ImmutableMap<RelativeFile, FileStatus> fromZipsAndDirectories(
            @NonNull Iterable<File> files); @NonNull static ImmutableMap<RelativeFile, FileStatus> makeFromBaseFiles(
            @NonNull Collection<File> baseFiles,
            @NonNull Map<File, FileStatus> updates,
            @NonNull FileCacheByPath cache);  }
@Test public void baseDirectoryCountOnEmpty() { ImmutableMap<RelativeFile, FileStatus> set = ImmutableMap.copyOf( Maps.<RelativeFile, FileStatus>newHashMap()); assertEquals(0, IncrementalRelativeFileSets.getBaseDirectoryCount(set)); }