Package org.jaxen.function
Class ConcatFunction
- java.lang.Object
-
- org.jaxen.function.ConcatFunction
-
- All Implemented Interfaces:
Function
public class ConcatFunction extends java.lang.Object implements Function
4.2string concat(string,string,string*)Concatenates its arguments and returns the resulting string.
- Author:
- bob mcwhirter (bob@werken.com)
- See Also:
- Section 4.2 of the XPath Specification
-
-
Constructor Summary
Constructors Constructor Description ConcatFunction()Create a newConcatFunctionobject.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectcall(Context context, java.util.List args)Concatenates the arguments and returns the resulting string.static java.lang.Stringevaluate(java.util.List list, Navigator nav)Converts each item in the list to a string and returns the concatenation of these strings.
-
-
-
Method Detail
-
call
public java.lang.Object call(Context context, java.util.List args) throws FunctionCallException
Concatenates the arguments and returns the resulting string. Non-string items are first converted to strings as if by the XPathstring()function.- Specified by:
callin interfaceFunction- Parameters:
context- the context at the point in the expression when the function is calledargs- the list of strings to be concatenated- Returns:
- a
Stringcontaining the concatenation of the items ofargs - Throws:
FunctionCallException- ifargshas less than two items
-
evaluate
public static java.lang.String evaluate(java.util.List list, Navigator nav)Converts each item in the list to a string and returns the concatenation of these strings. If necessary, each item is first converted to aStringas if by the XPathstring()function.- Parameters:
list- the items to be concatenatednav- ignored- Returns:
- the concatenation of the arguments
-
-