Package org.apache.juneau.objecttools
Class NumberMatcherFactory
java.lang.Object
org.apache.juneau.objecttools.MatcherFactory
org.apache.juneau.objecttools.NumberMatcherFactory
Number matcher factory for the
ObjectSearcher
class.
The class provides searching based on the following patterns:
"property=1" - A single number"property=1 2" - Multiple OR'ed numbers"property=-1 -2" - Multiple OR'ed negative numbers"property=1-2" ,"property=-2--1" - A range of numbers (whitespace ignored)"property=1-2 4-5" - Multiple OR'ed ranges"property=<1" ,"property=<=1" ,"property=>1" ,"property=>=1" - Open-ended ranges"property=!1" ,"property=!1-2" - Negation
See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue if this matcher can be used on the specified object.Instantiates a matcher for the specified pattern.
-
Field Details
-
DEFAULT
Default reusable matcher.
-
-
Constructor Details
-
NumberMatcherFactory
public NumberMatcherFactory()
-
-
Method Details
-
canMatch
Description copied from class:MatcherFactory
Returnstrue if this matcher can be used on the specified object.- Specified by:
canMatch
in classMatcherFactory
- Parameters:
cm
- The class type of the object being matched. Nevernull .- Returns:
true if this matcher can be used on the specified object.
-
create
Description copied from class:MatcherFactory
Instantiates a matcher for the specified pattern.- Specified by:
create
in classMatcherFactory
- Parameters:
pattern
- The pattern string.- Returns:
- A matcher for the specified pattern.
-