@Test public void validity() { RevisionPattern r = new RevisionPattern("11.8.4.*-{revision}"); assertFalse(r.isValidBuildName("11.8.5.0-123456")); assertFalse(r.isValidBuildName("11.8.4-123456")); assertTrue(r.isValidBuildName("11.8.4.5-123456")); assertFalse(r.isValidBuildName("11.8.4.5-v123456")); }
public boolean isValidBuildName(String buildName) { return extractRevision(buildName).isPresent(); }
RevisionPattern { public boolean isValidBuildName(String buildName) { return extractRevision(buildName).isPresent(); } }
RevisionPattern { public boolean isValidBuildName(String buildName) { return extractRevision(buildName).isPresent(); } @ConstructorProperties({"pattern"})  RevisionPattern(String pattern); }
RevisionPattern { public boolean isValidBuildName(String buildName) { return extractRevision(buildName).isPresent(); } @ConstructorProperties({"pattern"})  RevisionPattern(String pattern); boolean isValidBuildName(String buildName); OptionalLong extractRevision(String buildName); RevisionPattern clone(Function<String, String> replacementFunction); }
RevisionPattern { public boolean isValidBuildName(String buildName) { return extractRevision(buildName).isPresent(); } @ConstructorProperties({"pattern"})  RevisionPattern(String pattern); boolean isValidBuildName(String buildName); OptionalLong extractRevision(String buildName); RevisionPattern clone(Function<String, String> replacementFunction);  }