/* */ package org.jaxen.function;
/* */
/* */ import java.util.
Iterator;
/* */ import java.util.
List;
/* */ import org.jaxen.
Context;
/* */ import org.jaxen.
Function;
/* */ import org.jaxen.
FunctionCallException;
/* */ import org.jaxen.
Navigator;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class
ConcatFunction
/* */ implements
Function
/* */ {
/* */ public
Object call(
Context context,
List args) throws
FunctionCallException {
/* 94 */ if (
args.
size() >= 2)
/* */ {
/* 96 */ return
evaluate(
args,
context.
getNavigator());
/* */ }
/* */
/* */
/* 100 */ throw new
FunctionCallException("concat() requires at least two arguments");
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static
String evaluate(
List list,
Navigator nav) {
/* 117 */
StringBuffer result = new
StringBuffer();
/* 118 */
Iterator argIter =
list.
iterator();
/* 119 */ while (
argIter.
hasNext())
/* */ {
/* 121 */
result.
append(
StringFunction.
evaluate(
argIter.
next(),
nav));
/* */ }
/* */
/* */
/* 125 */ return
result.
toString();
/* */ }
/* */ }
/* Location: /Users/tommy/.m2/repository/jaxen/jaxen/1.1.1/jaxen-1.1.1.jar!/org/jaxen/function/ConcatFunction.class
* Java compiler version: 2 (46.0)
* JD-Core Version: 1.1.3
*/