1 61 62 63 package org.jaxen.function; 64 65 import java.util.List ; 66 67 import org.jaxen.Context; 68 import org.jaxen.Function; 69 import org.jaxen.FunctionCallException; 70 71 80 public class TrueFunction implements Function 81 { 82 83 86 public TrueFunction() {} 87 88 89 98 public Object call(Context context, 99 List args) throws FunctionCallException 100 { 101 if (args.size() == 0) 102 { 103 return evaluate(); 104 } 105 106 throw new FunctionCallException( "true() requires no arguments." ); 107 } 108 109 114 public static Boolean evaluate() 115 { 116 return Boolean.TRUE; 117 } 118 } 119 | Popular Tags |