org.apache.xerces.impl.xpath.regex

Class Match

public class Match extends Object implements Cloneable

An instance of this class has ranges captured in matching.

Version: $Id: Match.java,v 1.6 2004/10/04 22:07:40 mrglavas Exp $

Author: TAMURA Kent <kent@trl.ibm.co.jp>

See Also: (char[], int, int, Match) (char[], Match) RegularExpression RegularExpression RegularExpression

UNKNOWN:

Constructor Summary
Match()
Creates an instance.
Method Summary
Objectclone()
intgetBeginning(int index)
Return a start position in the target text matched to specified regular expression group.
StringgetCapturedText(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.
intgetNumberOfGroups()
Return the number of regular expression groups.
protected voidsetBeginning(int index, int v)
protected voidsetEnd(int index, int v)
protected voidsetNumberOfGroups(int n)
protected voidsetSource(CharacterIterator ci)
protected voidsetSource(String str)
protected voidsetSource(char[] chars)

Constructor Detail

Match

public Match()
Creates an instance.

Method Detail

clone

public Object clone()

getBeginning

public int getBeginning(int index)
Return a start position in the target text matched to specified regular expression group.

Parameters: index Less than getNumberOfGroups().

getCapturedText

public String getCapturedText(int index)
Return an substring of the target text matched to specified regular expression group.

Parameters: index Less than getNumberOfGroups().

getEnd

public int getEnd(int index)
Return an end position in the target text matched to specified regular expression group.

Parameters: index Less than getNumberOfGroups().

getNumberOfGroups

public int getNumberOfGroups()
Return the number of regular expression groups. This method returns 1 when the regular expression has no capturing-parenthesis.

setBeginning

protected void setBeginning(int index, int v)

setEnd

protected void setEnd(int index, int v)

setNumberOfGroups

protected void setNumberOfGroups(int n)

setSource

protected void setSource(CharacterIterator ci)

setSource

protected void setSource(String str)

setSource

protected void setSource(char[] chars)
Copyright © 1999-2005 Apache XML Project. All Rights Reserved.