Class SimplePattern
- java.lang.Object
-
- org.eclipse.equinox.p2.metadata.expression.SimplePattern
-
- All Implemented Interfaces:
Serializable
,Comparable<SimplePattern>
public class SimplePattern extends Object implements Serializable, Comparable<SimplePattern>
A simple compiled pattern. It supports two kinds of wildcards. The '*' (any character zero to many times) and the '?' (any character exactly one time).- Since:
- 2.0
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(SimplePattern o)
static SimplePattern
compile(String pattern)
boolean
equals(Object o)
int
hashCode()
boolean
isMatch(CharSequence value)
Matches thevalue
with the compiled expression.String
toString()
-
-
-
Method Detail
-
isMatch
public boolean isMatch(CharSequence value)
Matches thevalue
with the compiled expression. The value is considered matching if all characters are matched by the expression. A partial match is not enough.- Parameters:
value
- The value to match- Returns:
true
if the value was a match.
-
compareTo
public int compareTo(SimplePattern o)
- Specified by:
compareTo
in interfaceComparable<SimplePattern>
-
compile
public static SimplePattern compile(String pattern)
-
-