Remote System Explorer DataStore
Release 1.0

org.eclipse.dstore.core.util
Class Pattern

java.lang.Object
  extended byorg.eclipse.dstore.core.util.Pattern

public class Pattern
extends Object

This class is used to define a wildcard string pattern. Strings can be compared against a pattern to determine whether they match or not.


Constructor Summary
Pattern(String pattern, ArrayList matchSchema)
          Constructor
 
Method Summary
 String getSubMatch(String attribute)
          Returns a submatch
 ArrayList getSubMatches()
          Returns a list of submatches
 boolean matches(String compareStr)
          Checks whther a compare string matches the pattern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pattern

public Pattern(String pattern,
               ArrayList matchSchema)
Constructor

Parameters:
pattern - a wildcard string
matchSchema -
Method Detail

getSubMatches

public ArrayList getSubMatches()
Returns a list of submatches

Returns:
a list of submatches

getSubMatch

public String getSubMatch(String attribute)
Returns a submatch

Parameters:
attribute - an attribute to match
Returns:
a submatch

matches

public boolean matches(String compareStr)
Checks whther a compare string matches the pattern

Parameters:
compareStr - to string to compare
Returns:
true if there is a match

Remote System Explorer DataStore
Release 1.0

Guidelines for using DataStore APIs.