use of com.google.common.collect.ImmutableMultimap in project gradle by gradle.
the class FileCollectionFingerprintSerializer method readRootHashes.
private ImmutableMultimap<String, HashCode> readRootHashes(Decoder decoder) throws IOException {
int numberOfRoots = decoder.readSmallInt();
if (numberOfRoots == 0) {
return ImmutableMultimap.of();
}
ImmutableMultimap.Builder<String, HashCode> builder = ImmutableMultimap.builder();
for (int i = 0; i < numberOfRoots; i++) {
String absolutePath = stringInterner.intern(decoder.readString());
HashCode rootHash = hashCodeSerializer.read(decoder);
builder.put(absolutePath, rootHash);
}
return builder.build();
}
Aggregations