Package com.sun.msv.datatype.regexp
Class Match
java.lang.Object
com.sun.msv.datatype.regexp.Match
- All Implemented Interfaces:
Cloneable
An instance of this class has ranges captured in matching.
- Version:
- Match.java,v 1.4 2002/08/09 15:18:17 neilg Exp
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int[](package private) char[](package private) CharacterIterator(package private) int[](package private) int(package private) String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()intgetBeginning(int index) Return a start position in the target text matched to specified regular expression group.getCapturedText(int index) Return an substring of the target text matched to specified regular expression group.intgetEnd(int index) Return an end position in the target text matched to specified regular expression group.intReturn the number of regular expression groups.protected voidsetBeginning(int index, int v) protected voidsetEnd(int index, int v) protected voidsetNumberOfGroups(int n) protected voidsetSource(char[] chars) protected voidprotected void
-
Field Details
-
beginpos
int[] beginpos -
endpos
int[] endpos -
nofgroups
int nofgroups -
ciSource
CharacterIterator ciSource -
strSource
String strSource -
charSource
char[] charSource
-
-
Constructor Details
-
Match
public Match()Creates an instance.
-
-
Method Details
-
clone
-
setNumberOfGroups
protected void setNumberOfGroups(int n) -
setSource
-
setSource
-
setSource
protected void setSource(char[] chars) -
setBeginning
protected void setBeginning(int index, int v) -
setEnd
protected void setEnd(int index, int v) -
getNumberOfGroups
public int getNumberOfGroups()Return the number of regular expression groups. This method returns 1 when the regular expression has no capturing-parenthesis. -
getBeginning
public int getBeginning(int index) Return a start position in the target text matched to specified regular expression group.- Parameters:
index- Less thangetNumberOfGroups().
-
getEnd
public int getEnd(int index) Return an end position in the target text matched to specified regular expression group.- Parameters:
index- Less thangetNumberOfGroups().
-
getCapturedText
Return an substring of the target text matched to specified regular expression group.- Parameters:
index- Less thangetNumberOfGroups().
-