net.ranides.assira.text
Class ExtMatcher

java.lang.Object
  extended by net.ranides.assira.text.ExtMatcher
All Implemented Interfaces:
MatchResult

public class ExtMatcher
extends Object
implements MatchResult

Author:
ranides

Constructor Summary
ExtMatcher(Matcher matcher)
           
 
Method Summary
 int end()
           
 int end(int group)
           
 boolean find()
           
 boolean find(int start)
           
 String group()
           
 String group(int... values)
          ExtMatcher: Returns the input subsequence from first successfully captured group from the given list.
 String group(int index)
          ExtMatcher: Returns the input subsequence captured by the given group during the previous match operation.
 String group(int a, int b)
          ExtMatcher: Returns the input subsequence from first successfully captured group from the given list.
 String group(int a, int b, int c)
          ExtMatcher: Returns the input subsequence from first successfully captured group from the given list.
 int groupCount()
           
 Matcher matcher()
           
 boolean matches()
           
static Matcher matches(Pattern pattern, String value)
           
 Pattern pattern()
           
 Matcher reset()
           
 Matcher reset(CharSequence input)
           
 int start()
           
 int start(int group)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtMatcher

public ExtMatcher(Matcher matcher)
Method Detail

matcher

public Matcher matcher()

start

public int start()
Specified by:
start in interface MatchResult

start

public int start(int group)
Specified by:
start in interface MatchResult

end

public int end()
Specified by:
end in interface MatchResult

end

public int end(int group)
Specified by:
end in interface MatchResult

group

public String group()
Specified by:
group in interface MatchResult

group

public String group(int... values)
ExtMatcher: Returns the input subsequence from first successfully captured group from the given list.

Parameters:
index -
Returns:
The (possibly empty) subsequence captured by the group during the previous match. null if any group failed to match part of the input. null if there is no any capturing group in the pattern with the given index.

group

public String group(int index)
ExtMatcher: Returns the input subsequence captured by the given group during the previous match operation.

Specified by:
group in interface MatchResult
Parameters:
index -
Returns:
The (possibly empty) subsequence captured by the group during the previous match. null if the group failed to match part of the input. null if there is no capturing group in the pattern with the given index.

group

public String group(int a,
                    int b)
ExtMatcher: Returns the input subsequence from first successfully captured group from the given list.

Parameters:
index -
Returns:
The (possibly empty) subsequence captured by the group during the previous match. null if any group failed to match part of the input. null if there is no any capturing group in the pattern with the given index.

group

public String group(int a,
                    int b,
                    int c)
ExtMatcher: Returns the input subsequence from first successfully captured group from the given list.

Parameters:
index -
Returns:
The (possibly empty) subsequence captured by the group during the previous match. null if any group failed to match part of the input. null if there is no any capturing group in the pattern with the given index.

groupCount

public int groupCount()
Specified by:
groupCount in interface MatchResult

pattern

public Pattern pattern()

reset

public Matcher reset()

reset

public Matcher reset(CharSequence input)

matches

public boolean matches()

find

public boolean find()

find

public boolean find(int start)

matches

public static Matcher matches(Pattern pattern,
                              String value)


Copyright © 2013. All Rights Reserved.