java.lang.Object
dev.metaschema.core.metapath.function.library.FnExactlyOne
Implements the XPath 3.1 fn:exactly-one
function.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ISequence<?>fnExactlyOne(ISequence<?> sequence) Check that the provided sequence has exactly one item.
-
Method Details
-
fnExactlyOne
Check that the provided sequence has exactly one item.Based on the XPath 3.1 fn:exactly-one function.
- Parameters:
sequence- the sequence to evaluate- Returns:
- the sequence if it has zero or one items
- Throws:
InvalidArgumentFunctionException- with the codeInvalidArgumentFunctionException.INVALID_ARGUMENT_EXACTLY_ONEif the sequence contains less or more than one item
-