@Test public void testKnownPaths() { Validation v = new IfPathExistsValidation("hello", Validations.single().allowedValues("world", 2)); assertEquals(Sets.newHashSet("hello", "world"), v.getKnownPaths()); }
@Override public Set<String> getKnownPaths() { Set<String> knownPaths = Sets.newHashSet(ifPath); knownPaths.addAll(thenValidation.getKnownPaths()); return Sets.newHashSet(knownPaths); }
IfPathExistsValidation implements Validation { @Override public Set<String> getKnownPaths() { Set<String> knownPaths = Sets.newHashSet(ifPath); knownPaths.addAll(thenValidation.getKnownPaths()); return Sets.newHashSet(knownPaths); } }
IfPathExistsValidation implements Validation { @Override public Set<String> getKnownPaths() { Set<String> knownPaths = Sets.newHashSet(ifPath); knownPaths.addAll(thenValidation.getKnownPaths()); return Sets.newHashSet(knownPaths); } IfPathExistsValidation(String ifPath, Validation thenValidation); }
IfPathExistsValidation implements Validation { @Override public Set<String> getKnownPaths() { Set<String> knownPaths = Sets.newHashSet(ifPath); knownPaths.addAll(thenValidation.getKnownPaths()); return Sets.newHashSet(knownPaths); } IfPathExistsValidation(String ifPath, Validation thenValidation); @Override ValidationResult validate(Config config); @Override String toString(); @Override Set<String> getKnownPaths(); }
IfPathExistsValidation implements Validation { @Override public Set<String> getKnownPaths() { Set<String> knownPaths = Sets.newHashSet(ifPath); knownPaths.addAll(thenValidation.getKnownPaths()); return Sets.newHashSet(knownPaths); } IfPathExistsValidation(String ifPath, Validation thenValidation); @Override ValidationResult validate(Config config); @Override String toString(); @Override Set<String> getKnownPaths();  }