Class SimplePattern
- java.lang.Object
-
- org.eclipse.equinox.p2.metadata.expression.SimplePattern
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<SimplePattern>
public class SimplePattern extends java.lang.Object implements java.io.Serializable, java.lang.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 intcompareTo(SimplePattern o)static SimplePatterncompile(java.lang.String pattern)booleanequals(java.lang.Object o)inthashCode()booleanisMatch(java.lang.CharSequence value)Matches thevaluewith the compiled expression.java.lang.StringtoString()
-
-
-
Method Detail
-
isMatch
public boolean isMatch(java.lang.CharSequence value)
Matches thevaluewith 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:
trueif the value was a match.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
compareTo
public int compareTo(SimplePattern o)
- Specified by:
compareToin interfacejava.lang.Comparable<SimplePattern>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compile
public static SimplePattern compile(java.lang.String pattern)
-
-