com.plumtree.openfoundation.util
Class XPMatch

java.lang.Object
  extended bycom.plumtree.openfoundation.util.XPMatch

public class XPMatch
extends java.lang.Object

Represents A resulting object from a single regular expression match.


Constructor Summary
XPMatch(MatchResult mr)
          All matchers have the state used by Pattern during a match.
 
Method Summary
 int GetIndex()
          Returns the position in the original string where the first character of the matched substring was found.
 int GetLength()
          Returns the length of the matched substring.
 java.lang.String GetValue()
          Returns the matched substring from the input string.
 boolean Success()
          Gets a value indicating whether the match is successful.
 java.lang.String ToString()
          Gets the matched substring from the input string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPMatch

public XPMatch(MatchResult mr)
All matchers have the state used by Pattern during a match.

Parameters:
mr - Apache regex MatchResult.
Method Detail

ToString

public java.lang.String ToString()
Gets the matched substring from the input string.

Returns:
Sub String that matched.

GetIndex

public int GetIndex()
Returns the position in the original string where the first character of the matched substring was found.

Returns:
index of string where the first character of the matched.

GetLength

public int GetLength()
Returns the length of the matched substring.

Returns:
length of the matched substring.

GetValue

public java.lang.String GetValue()
Returns the matched substring from the input string.

Returns:
matched substring value.

Success

public boolean Success()
Gets a value indicating whether the match is successful. Returns true if the match is successful; otherwise, false

Returns:
true if the match is successful; otherwise, false


Copyright 2002, 2003, 2004 Plumtree Software Inc. All Rights Reserved.