|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoscript.data.Value
oscript.data.OObject
oscript.data.RegExpResult
The result of executing a pattern against a string. This object acts both as an object and as an array with the following properties and indicies:
Property/Index | Description |
---|---|
property: index |
the index of the matched string |
property: input |
the original string |
index: 0 |
the last matched characters |
index: 1 thru n |
The parenthesized substring matches, if any |
Note 2: the properties (index
, etc) work by bean-access,
so they are implemented by getter methods (since they are read-only)
Field Summary | |
static java.lang.String[] |
MEMBER_NAMES
|
static java.lang.String |
PARENT_TYPE_NAME
|
static Value |
TYPE
|
static java.lang.String |
TYPE_NAME
|
Fields inherited from class oscript.data.OObject |
EMPTY_EXPR_LIST_EVALUATOR |
Fields inherited from class oscript.data.Value |
DEBUG, NULL, UNDEFINED |
Constructor Summary | |
protected |
RegExpResult(Value input)
Class Constructor. |
Method Summary | |
abstract Value |
elementAt(Value idx)
Get the specified index of this object, if this object is an array. |
abstract Value |
getIndex()
The index of the match in the string, or -1 if no match. |
Value |
getInput()
Get the original input string. |
protected Value |
getTypeImpl()
Get the type of this object. |
abstract int |
length()
For types that implement elementAt , this returns the
number of elements. |
Methods inherited from class oscript.data.OObject |
castToString, getMember, populateMemberSet |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Value TYPE
public static final java.lang.String PARENT_TYPE_NAME
public static final java.lang.String TYPE_NAME
public static final java.lang.String[] MEMBER_NAMES
Constructor Detail |
protected RegExpResult(Value input)
input
- the string to match the regular expression againstMethod Detail |
protected Value getTypeImpl()
Value.getType()
.
getTypeImpl
in class OObject
public Value getInput()
public abstract Value getIndex()
-1
if no match.
public abstract int length() throws PackagedScriptObjectException
elementAt
, this returns the
number of elements.
length
in class Value
PackagedScriptObjectException(NoSuchMemberException)
PackagedScriptObjectException
elementAt(oscript.data.Value)
,
Value.elementsAt(oscript.data.Value, oscript.data.Value)
public abstract Value elementAt(Value idx) throws PackagedScriptObjectException
elementAt
in class Value
idx
- the index to get
PackagedScriptObjectException(NoSuchMemberException)
PackagedScriptObjectException
length()
,
Value.elementsAt(oscript.data.Value, oscript.data.Value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |