final Expr arg;
- NamespaceUriFunction(List args)
+ NamespaceUriFunction(List<Expr> args)
{
- this(args.size() > 0 ? (Expr) args.get(0) : null);
+ this(args.size() > 0 ? args.get(0) : null);
}
NamespaceUriFunction(Expr arg)
this.arg = arg;
}
+ @Override
public Object evaluate(Node context, int pos, int len)
{
- Object val = (arg == null) ? Collections.singleton(context) :
- arg.evaluate(context, pos, len);
- return _namespace_uri(context, (Collection) val);
+ /* Suppression is safe, as we know context produces Collection<Node> */
+ @SuppressWarnings("unchecked")
+ Collection<Node> val = (arg == null) ? Collections.singleton(context) :
+ (Collection<Node>) arg.evaluate(context, pos, len);
+ return _namespace_uri(context, val);
}
public Expr clone(Object context)