com.raelity.text
Class RegExpResultJava

java.lang.Object
  extended by com.raelity.text.RegExpResult
      extended by com.raelity.text.RegExpResultJava

public class RegExpResultJava
extends RegExpResult


Constructor Summary
RegExpResultJava(Matcher m)
           
 
Method Summary
 String group(int i)
          Retrive backreference (matching string in the input) for the ith set of parenthesis in the pattern.
 boolean isMatch()
          Check if the associated search produced a match.
 int length(int i)
          The length of the of corresponding backreference.
 int nGroup()
          Return the number of backreferences.
 int start(int i)
          The returned value is the offset from the beginning of the input to where the ith backreference starts.
 int stop(int i)
          The returned value is the offset from the beginning of the input to where the ith backreference ends.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegExpResultJava

public RegExpResultJava(Matcher m)
Method Detail

isMatch

public boolean isMatch()
Description copied from class: RegExpResult
Check if the associated search produced a match.

Specified by:
isMatch in class RegExpResult
Returns:
True if the input matched. Otherwise false.

nGroup

public int nGroup()
Description copied from class: RegExpResult
Return the number of backreferences.

Specified by:
nGroup in class RegExpResult

group

public String group(int i)
Description copied from class: RegExpResult
Retrive backreference (matching string in the input) for the ith set of parenthesis in the pattern. The backreference groups are numbered starting with 1. If i == 0 then return the part of the input string that matched the pattern.

Specified by:
group in class RegExpResult
Returns:
The specified backreference or null if backreference did not match.

length

public int length(int i)
Description copied from class: RegExpResult
The length of the of corresponding backreference. If i == 0 then the length of the entire match is returned.

Specified by:
length in class RegExpResult
Returns:
The length of the specified backreference.

start

public int start(int i)
Description copied from class: RegExpResult
The returned value is the offset from the beginning of the input to where the ith backreference starts. If i == 0 then the value is the offset in the input where entire match starts.

Specified by:
start in class RegExpResult

stop

public int stop(int i)
Description copied from class: RegExpResult
The returned value is the offset from the beginning of the input to where the ith backreference ends. If i == 0 then the value is the offset in the input where entire match ends.

Specified by:
stop in class RegExpResult