public Stream<? extends XdmItem> apply(XdmItem arg) { try { return XdmFunctionItem.this.call(processor, arg).stream(); } catch (SaxonApiException e) { throw new SaxonApiUncheckedException(e); } } };
public Stream<? extends XdmItem> apply(XdmItem arg) { try { return XdmFunctionItem.this.call(processor, arg).stream(); } catch (SaxonApiException e) { throw new SaxonApiUncheckedException(e); } } };
/** * Get an equivalent Java Function object representing this XdmFunction. * This is possible only for arity-1 functions. * @return a Java Function. This takes an XdmValue * as its argument, and returns the function result in the form of an XdmValue. * The Function throws an unchecked exception if evaluation fails * @throws IllegalStateException if the arity of the function is not one (1). */ public java.util.function.Function<? super XdmValue, ? extends XdmValue> asFunction(Processor processor) { if (getArity() == 1) { return (java.util.function.Function<XdmValue, XdmValue>) arg -> { try { return XdmFunctionItem.this.call(processor, arg); } catch (SaxonApiException e) { throw new SaxonApiUncheckedException(e); } }; } else { throw new IllegalStateException("Function arity must be one"); } }
/** * Get an equivalent Java Function object representing this XdmFunction. * This is possible only for arity-1 functions. * @return a Java Function. This takes an XdmValue * as its argument, and returns the function result in the form of an XdmValue. * The Function throws an unchecked exception if evaluation fails * @throws IllegalStateException if the arity of the function is not one (1). */ public java.util.function.Function<? super XdmValue, ? extends XdmValue> asFunction(Processor processor) { if (getArity() == 1) { return (java.util.function.Function<XdmValue, XdmValue>) arg -> { try { return XdmFunctionItem.this.call(processor, arg); } catch (SaxonApiException e) { throw new SaxonApiUncheckedException(e); } }; } else { throw new IllegalStateException("Function arity must be one"); } }