com.bramosystems.oss.player.util.client
Class RegExp.RegexResult

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.bramosystems.oss.player.util.client.RegExp.RegexResult
Enclosing class:
RegExp

public static class RegExp.RegexResult
extends com.google.gwt.core.client.JavaScriptObject

The RegExpResult wraps the result of the search performed by the RegExp.exec(java.lang.String) method

Since:
1.1
Author:
Sikirulai Braheem

Constructor Summary
protected RegExp.RegexResult()
          The constructor
 
Method Summary
 int getIndex()
          Returns the character position of the matched substring within the string
 String getInput()
          Returns the input string
 String getMatch(int index)
          Gets the matching string at the specified index.
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RegExp.RegexResult

protected RegExp.RegexResult()
The constructor

Method Detail

getIndex

public final int getIndex()
Returns the character position of the matched substring within the string

Returns:
the position of the matched substring

getInput

public final String getInput()
Returns the input string

Returns:
the input string

getMatch

public final String getMatch(int index)
Gets the matching string at the specified index.

Index 0 contains the complete matching substring while other elements of the array (1 through n) contain substrings that match parenthetical groups in the regular expression

Parameters:
index - the index to be retrieved
Returns:
the value at the given index, or null if none exists


Copyright © 2009-2011. All Rights Reserved.