Package org.jaxen.function
Class ContainsFunction
java.lang.Object
org.jaxen.function.ContainsFunction
- All Implemented Interfaces:
Function
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.
- Author:
- bob mcwhirter (bob @ werken.com)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns true if the string-value of the first item inargs
contains string-value of the second item; false otherwise.static Boolean
Returns true if the first string contains the second string; false otherwise.
-
Constructor Details
-
ContainsFunction
public ContainsFunction()Create a newContainsFunction
object.
-
-
Method Details
-
call
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 XPathstring()
function.- Specified by:
call
in interfaceFunction
- Parameters:
context
- the context at the point in the expression when the function is calledargs
- a list containing exactly two items- Returns:
- the result of evaluating the function;
Boolean.TRUE
orBoolean.FALSE
- Throws:
FunctionCallException
- ifargs
does not have exactly two items
-