|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jaxen.function.ContainsFunction
public class ContainsFunction
4.2 boolean contains(string,string)
The contains function returns true if the first argument string contains the second argument string, and otherwise returns false.
Constructor Summary | |
---|---|
ContainsFunction()
Create a new ContainsFunction object. |
Method Summary | |
---|---|
java.lang.Object |
call(Context context,
java.util.List args)
Returns true if the string-value of the first item in args contains string-value of the second
item; false otherwise. |
static java.lang.Boolean |
evaluate(java.lang.Object strArg,
java.lang.Object matchArg,
Navigator nav)
Returns true if the first string contains the second string; false otherwise. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContainsFunction()
ContainsFunction
object.
Method Detail |
---|
public java.lang.Object call(Context context, java.util.List args) throws FunctionCallException
Returns true if the string-value of the
first item in args
contains string-value of the second
item; false otherwise.
If necessary one or both items are converted to a string as if by the XPath
string()
function.
call
in interface Function
context
- the context at the point in the
expression when the function is calledargs
- a list containing exactly two items
Boolean.TRUE
or Boolean.FALSE
FunctionCallException
- if args
does not have exactly two itemspublic static java.lang.Boolean evaluate(java.lang.Object strArg, java.lang.Object matchArg, Navigator nav)
Returns true if the first string contains the second string; false otherwise.
If necessary one or both arguments are converted to a string as if by the XPath
string()
function.
strArg
- the containing stringmatchArg
- the contained stringnav
- used to calculate the string-values of the first two arguments
Boolean.TRUE
if true if the first string contains
the second string; Boolean.FALSE
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |