Class WildcardHelper
java.lang.Object
org.apache.sling.discovery.base.connectors.ping.wl.WildcardHelper
Helper class for wildcards
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanmatchesWildcard(String comparee, String patternWithWildcards) Compare a given string (comparee) against a pattern that contains wildcards and return true if it matches.static StringwildcardAsRegex(String patternWithWildcards) converts a string containing wildcards (* and ?)
-
Constructor Details
-
WildcardHelper
public WildcardHelper()
-
-
Method Details
-
wildcardAsRegex
converts a string containing wildcards (* and ?) into a valid regex -
matchesWildcard
Compare a given string (comparee) against a pattern that contains wildcards and return true if it matches.- Parameters:
comparee- the string which should be tested against a pattern containing wildcardspatternWithWildcards- the pattern containing wildcards (* and ?)- Returns:
- true if the comparee string matches against the pattern containing wildcards
-