org.acmsl.regexpplugin
Interface Matcher

All Superinterfaces:
org.acmsl.version.Versionable
All Known Implementing Classes:
AwkMatcherOROAdapter, MatcherGNUAdapter, MatcherRegexpAdapter, Perl5MatcherOROAdapter

public interface Matcher
extends org.acmsl.version.Versionable

Represents a regexp pattern matcher. Different implementations vary but they all must respect this set of methods.

Version:
$Revision: 1.5 $
Author:
Jose San Leandro Armend?riz

Field Summary
static org.acmsl.version.Version VERSION
          Concrete version object updated everytime it's checked-in in a CVS repository.
 
Method Summary
 boolean contains(java.lang.String text, Pattern pattern)
          Checks if given text contains specified pattern.
 MatchResult getMatch()
          Retrieves the last match found due to a previous call to contains method.
 
Methods inherited from interface org.acmsl.version.Versionable
getVersion
 

Field Detail

VERSION

public static final org.acmsl.version.Version VERSION
Concrete version object updated everytime it's checked-in in a CVS repository.

Method Detail

contains

public boolean contains(java.lang.String text,
                        Pattern pattern)
Checks if given text contains specified pattern.

Parameters:
text - the text to analyze.
pattern - the regular expression to apply.
Returns:
true if the pattern is found.

getMatch

public MatchResult getMatch()
Retrieves the last match found due to a previous call to contains method.

Returns:
such match result.


Copyright © 2003 ACM S.L.. All Rights Reserved.