org.acmsl.regexpplugin
Interface MatchResult
- All Superinterfaces:
- org.acmsl.version.Versionable
- All Known Implementing Classes:
- MatchResultGNUAdapter, MatchResultOROAdapter, MatchResultRegexpAdapter
- public interface MatchResult
- extends org.acmsl.version.Versionable
Represents the result of match in a regexp parsing process. 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 |
java.lang.String |
group(int group)
Taken from Jakarta ORO javadoc:
Returns the contents of the parenthesized subgroups of a match,
counting parentheses from left to right and starting from 1. |
int |
groups()
Taken from Jakarta ORO 2.0.6 javadoc:
The number of groups contained in the result. |
Methods inherited from interface org.acmsl.version.Versionable |
getVersion |
VERSION
public static final org.acmsl.version.Version VERSION
- Concrete version object updated everytime it's checked-in in a CVS
repository.
group
public java.lang.String group(int group)
- Taken from Jakarta ORO javadoc:
Returns the contents of the parenthesized subgroups of a match,
counting parentheses from left to right and starting from 1. Group 0
always refers to the entire match.
For example, if the pattern foo(\d+)
is used to extract a match from the input abfoo123 , then group(0) will
return foo123 and group(1) will return 123 . group(2) will return null
because there is only one subgroup in the original pattern.
- Parameters:
group
- The pattern subgroup to return.
- Returns:
- A string containing the indicated pattern subgroup. Group 0
always refers to the entire match. If a group was never matched, it
returns null. This is not to be confused with a group matching the null
string, which will return a String of length 0.
groups
public int groups()
- Taken from Jakarta ORO 2.0.6 javadoc:
The number of groups contained in the result. This number
includes the 0th group. In other words, the result refers to
the number of parenthesized subgroups plus the entire match
itself..
- Returns:
- such value.
Copyright © 2003 ACM S.L.. All Rights Reserved.