Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.impl.xpath.regex

public Class Match

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
java.text.CharacterIterator

An instance of this class has ranges captured in matching.
Author
TAMURA Kent <kent@trl.ibm.co.jp>
See Also
RegularExpression#matches(char[], int, int, Match), RegularExpression#matches(char[], Match), RegularExpression#matches(java.text.CharacterIterator, Match), RegularExpression#matches(java.lang.String, int, int, Match), RegularExpression#matches(java.lang.String, Match)

Field Summary

Modifier and TypeField and Description
pack-priv int[]
pack-priv char[]
pack-priv CharacterIterator
pack-priv int[]
pack-priv int
pack-priv String

Constructor Summary

AccessConstructor and Description
public
Match()

Creates an instance.

Method Summary

Modifier and TypeMethod and Description
public synchronized Object
clone()

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.
public int
getBeginning(int
Less than getNumberOfGroups().
index
)

Return a start position in the target text matched to specified regular expression group.

public String
getCapturedText(int
Less than getNumberOfGroups().
index
)

Return an substring of the target text matched to specified regular expression group.

public int
getEnd(int
Less than getNumberOfGroups().
index
)

Return an end position in the target text matched to specified regular expression group.

public int
getNumberOfGroups()

Return the number of regular expression groups.

protected void
setBeginning(int index, int v)

protected void
setEnd(int index, int v)

protected void
protected void
protected void
protected void
setSource(char[] chars)

Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

beginposback to summary
pack-priv int[] beginpos
charSourceback to summary
pack-priv char[] charSource
ciSourceback to summary
pack-priv CharacterIterator ciSource
endposback to summary
pack-priv int[] endpos
nofgroupsback to summary
pack-priv int nofgroups
strSourceback to summary
pack-priv String strSource

Constructor Detail

Matchback to summary
public Match()

Creates an instance.

Method Detail

cloneback to summary
public synchronized Object clone()

Overrides java.lang.Object.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns:Object

a clone of this instance.

getBeginningback to summary
public int getBeginning(int index)

Return a start position in the target text matched to specified regular expression group.

Parameters
index:int

Less than getNumberOfGroups().

getCapturedTextback to summary
public String getCapturedText(int index)

Return an substring of the target text matched to specified regular expression group.

Parameters
index:int

Less than getNumberOfGroups().

getEndback to summary
public int getEnd(int index)

Return an end position in the target text matched to specified regular expression group.

Parameters
index:int

Less than getNumberOfGroups().

getNumberOfGroupsback to summary
public int getNumberOfGroups()

Return the number of regular expression groups. This method returns 1 when the regular expression has no capturing-parenthesis.

setBeginningback to summary
protected void setBeginning(int index, int v)
setEndback to summary
protected void setEnd(int index, int v)
setNumberOfGroupsback to summary
protected void setNumberOfGroups(int n)
setSourceback to summary
protected void setSource(CharacterIterator ci)
setSourceback to summary
protected void setSource(String str)
setSourceback to summary
protected void setSource(char[] chars)