Eclipse Platform
Kepler (4.3)

org.eclipse.equinox.p2.metadata.expression
Class SimplePattern

java.lang.Object
  extended by 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
 int compareTo(SimplePattern o)
           
static SimplePattern compile(java.lang.String pattern)
           
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 boolean isMatch(java.lang.CharSequence value)
          Matches the value with the compiled expression.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

isMatch

public boolean isMatch(java.lang.CharSequence value)
Matches the value 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.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(SimplePattern o)
Specified by:
compareTo in interface java.lang.Comparable<SimplePattern>

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

compile

public static SimplePattern compile(java.lang.String pattern)

Eclipse Platform
Kepler (4.3)

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2012. All rights reserved.