Package net.sf.saxon.functions
Class StringJoin
java.lang.Object
net.sf.saxon.functions.AbstractFunction
net.sf.saxon.functions.SystemFunction
net.sf.saxon.functions.FoldingFunction
net.sf.saxon.functions.StringJoin
- All Implemented Interfaces:
Callable
,PushableFunction
,FunctionItem
,GroundedValue
,Item
,Sequence
fn:string-join(string* $sequence, string $separator)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Determine whether two expressions are equivalentint
getCardinality
(Expression[] arguments) Determine the cardinality of the function.getFold
(XPathContext context, Sequence... additionalArguments) Create the Fold object which actually performs the evaluation.int
hashCode()
boolean
makeOptimizedFunctionCall
(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo, Expression... arguments) Allow the function to create an optimized call based on the values of the actual argumentsvoid
process
(Outputter destination, XPathContext context, Sequence[] arguments) Evaluate the function in "push" modevoid
setReturnEmptyIfEmpty
(boolean option) Indicate that when the input sequence (first argument) is empty, the function should return an empty sequence rather than an empty stringMethods inherited from class net.sf.saxon.functions.FoldingFunction
call, getStreamerName
Methods inherited from class net.sf.saxon.functions.SystemFunction
dependsOnContextItem, dynamicCall, export, exportAdditionalArguments, exportAttributes, fixArguments, getArity, getContextNode, getDescription, getDetails, getElaborator, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getIntegerBounds, getNetCost, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getSpecialProperties, getStaticBaseUriString, getUniStringArg, importAttributes, isSequenceVariadic, isTrustedResultType, makeCall, makeFunction, makeFunction40, makeFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation, toShortString, toString, typeCheckCaller
Methods inherited from class net.sf.saxon.functions.AbstractFunction
atomize, deepEqual40, deepEquals, effectiveBooleanValue, getAnnotations, getUnicodeStringValue, isArray, isMap, makeNewContext, simplify, typeCheck
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.sf.saxon.om.FunctionItem
getGenre
Methods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, materialize
Methods inherited from interface net.sf.saxon.om.Item
getLength, getStringValue, head, isStreamed, itemAt, iterate, reduce, subsequence
Methods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Constructor Details
-
StringJoin
public StringJoin()
-
-
Method Details
-
setReturnEmptyIfEmpty
public void setReturnEmptyIfEmpty(boolean option) Indicate that when the input sequence (first argument) is empty, the function should return an empty sequence rather than an empty string- Parameters:
option
- true if an empty sequence should be returned when the input is an empty sequence.
-
isReturnEmptyIfEmpty
public boolean isReturnEmptyIfEmpty() -
getCardinality
Determine the cardinality of the function.- Overrides:
getCardinality
in classSystemFunction
- Parameters:
arguments
- the actual arguments supplied- Returns:
- the most precise available cardinality that the function will return
-
equals
Determine whether two expressions are equivalent- Overrides:
equals
in classSystemFunction
-
hashCode
public int hashCode()- Overrides:
hashCode
in classSystemFunction
-
makeOptimizedFunctionCall
public Expression makeOptimizedFunctionCall(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo, Expression... arguments) throws XPathException Allow the function to create an optimized call based on the values of the actual arguments- Overrides:
makeOptimizedFunctionCall
in classSystemFunction
- Parameters:
visitor
- the expression visitorcontextInfo
- information about the context itemarguments
- the supplied arguments to the function call- Returns:
- either a function call on this function, or an expression that delivers the same result, or null indicating that no optimization has taken place
- Throws:
XPathException
- if an error is detected
-
getFold
Description copied from class:FoldingFunction
Create the Fold object which actually performs the evaluation. Must be implemented in every subclass.- Specified by:
getFold
in classFoldingFunction
- Parameters:
context
- the dynamic evaluation contextadditionalArguments
- the values of all arguments other than the first.- Returns:
- the Fold object used to compute the function
- Throws:
XPathException
- if a dynamic error occurs
-
process
public void process(Outputter destination, XPathContext context, Sequence[] arguments) throws XPathException Description copied from interface:PushableFunction
Evaluate the function in "push" mode- Specified by:
process
in interfacePushableFunction
- Parameters:
destination
- the destination for the function resultcontext
- the dynamic evaluation contextarguments
- the supplied arguments to the function- Throws:
XPathException
- if a dynamic error occurs during the evaluation
-