org.xfp.filters
Class PatternMatcher
java.lang.Object
org.xfp.AttributeContainer
org.xfp.Filter
org.xfp.filters.PatternMatcher
- public class PatternMatcher
- extends Filter
Attempts to match the entire input sequence against the pattern.
If the match succeeds then the input String is returned,
otherwise null is returned causing all descendant filters to be skipped.
- Author:
- Flavio Tordini
Method Summary |
java.lang.String |
execute(org.apache.commons.net.ftp.FTPFile ftpfile)
Executes this filter. |
java.lang.String |
execute(java.lang.String string)
Executes this filter. |
void |
reset()
Resets filter status after execution. |
void |
setPattern(java.lang.String pattern)
Sets the pattern. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PatternMatcher
public PatternMatcher()
execute
public java.lang.String execute(org.apache.commons.net.ftp.FTPFile ftpfile)
throws java.lang.Exception
- Executes this filter.
- Throws:
java.lang.Exception
execute
public java.lang.String execute(java.lang.String string)
- Executes this filter.
reset
public void reset()
- Description copied from class:
Filter
- Resets filter status after execution. This method is called after
execute(), even in case of exceptions. Since a Filter instance may be
reused (and actually is), you must use this method to reset all your
class members to their default value.
- Specified by:
reset
in class Filter
- See Also:
Filter.reset()
setPattern
public void setPattern(java.lang.String pattern)
- Sets the pattern.
- Parameters:
pattern
- The expression to be matched
Copyright © 2003-2004 XFP Team. All Rights Reserved.