Class SemanticVersionPattern
java.lang.Object
com.kazurayam.materialstore.core.metadata.SemanticVersionPattern
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
escapeAsRegex
(String path) Compare the leftPath and the rightPath are similar.pattern()
static Matcher
straightMatcher
(String string) returns a java.util.regex.Matcher for the string.static Pattern
translateToBaseStrToPattern
(String baseStr)
-
Constructor Details
-
SemanticVersionPattern
-
-
Method Details
-
matcher
Compare the leftPath and the rightPath are similar. If the 2 strings contain a Semantic Version, then the version is smartly disregarded.E.g, (1) "/some/path/x" and "/some/path/x" will return true (2) "/some/path/x" and "/some/path/Y" will return false (3) "/some/path-1.2.0/x" and "/some/path-1.2.3-alpha/x" will return true
- Parameters:
leftStr
- TODO- Returns:
- if leftStr is identical to the baseStr, return true; otherwise false
-
pattern
-
straightMatcher
returns a java.util.regex.Matcher for the string. The matcher.matches() will return true if the string contains a semantic version like "0.1.2-alpha".- Parameters:
string
- TODO- Returns:
- TODO
-
translateToBaseStrToPattern
-
escapeAsRegex
-