@Test public void clone_no_replacement() { RevisionPattern r = new RevisionPattern("11.8.4*-{revision}"); assertEquals("11.8.4*-{revision}", r.clone(value -> StringUtils.replace(value, "${sourceName}", "1.0")).getPattern()); }
public RevisionPattern clone(Function<String, String> replacementFunction) { return new RevisionPattern( replacementFunction.apply(pattern) ); }
RevisionPattern { public RevisionPattern clone(Function<String, String> replacementFunction) { return new RevisionPattern( replacementFunction.apply(pattern) ); } }
RevisionPattern { public RevisionPattern clone(Function<String, String> replacementFunction) { return new RevisionPattern( replacementFunction.apply(pattern) ); } @ConstructorProperties({"pattern"})  RevisionPattern(String pattern); }
RevisionPattern { public RevisionPattern clone(Function<String, String> replacementFunction) { return new RevisionPattern( replacementFunction.apply(pattern) ); } @ConstructorProperties({"pattern"})  RevisionPattern(String pattern); boolean isValidBuildName(String buildName); OptionalLong extractRevision(String buildName); RevisionPattern clone(Function<String, String> replacementFunction); }
RevisionPattern { public RevisionPattern clone(Function<String, String> replacementFunction) { return new RevisionPattern( replacementFunction.apply(pattern) ); } @ConstructorProperties({"pattern"})  RevisionPattern(String pattern); boolean isValidBuildName(String buildName); OptionalLong extractRevision(String buildName); RevisionPattern clone(Function<String, String> replacementFunction);  }