Package org.openstreetmap.josm.tools
Class PatternUtils
java.lang.Object
org.openstreetmap.josm.tools.PatternUtils
A class that caches compiled patterns.
- Since:
- 18475
-
Field Summary
FieldsModifier and TypeFieldDescriptionA cache for Java Patterns (no flags)private static final StringA string that is highly unlikely to appear in regexes to split a regex from its flags -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
MAGIC_STRING
A string that is highly unlikely to appear in regexes to split a regex from its flags- See Also:
-
cache
A cache for Java Patterns (no flags)
-
-
Constructor Details
-
PatternUtils
private PatternUtils()
-
-
Method Details
-
compile
Compile a regex into a pattern. This may return aPatternused elsewhere. This is safe.- Parameters:
regex- The regex to compile- Returns:
- The immutable
Pattern. - See Also:
-
compile
Compile a regex into a pattern. This may return aPatternused elsewhere. This is safe.
-