Code example for ImmutableMap

Methods: values

0
    symlinkTreeBuildRule.appendToRuleKey(builder1);
    RuleKey.Builder.RuleKeyPair pair1 = builder1.build();
 
    // Change the contents of the target of the link. 
    Path existingFile =
        new SourcePathResolver(new BuildRuleResolver()).getPath(links.values().asList().get(0));
    Files.write(existingFile, "something new".getBytes(Charsets.UTF_8));
 
    // Re-calculate the rule key 
    RuleKey.Builder builder2 = ruleKeyBuilderFactory.newInstance(
        symlinkTreeBuildRule,
        resolver);
    symlinkTreeBuildRule.appendToRuleKey(builder2);
    RuleKey.Builder.RuleKeyPair pair2 = builder2.build();
 
    // Verify that the rules keys are the same. 
    assertEquals(pair1.getTotalRuleKey(), pair2.getTotalRuleKey());
    assertEquals(pair1.getRuleKeyWithoutDeps(), pair2.getRuleKeyWithoutDeps());
 
  } 
Contextual code suggestions in your IDE  Get Codota for Java