Class Number_1

    • Constructor Detail

      • Number_1

        public Number_1()
    • Method Detail

      • resultWhenEmpty

        public DoubleValue resultWhenEmpty()
        Description copied from class: ScalarSystemFunction
        Method that may be supplied in subclasses, to indicate the result that is returned when an empty sequence is supplied as the argument value. The default is to return the empty sequence
        Overrides:
        resultWhenEmpty in class ScalarSystemFunction
        Returns:
        the result of evaluation when the supplied argument is an empty sequence
      • typeCheckCaller

        public Expression typeCheckCaller​(FunctionCall caller,
                                          ExpressionVisitor visitor,
                                          ContextItemStaticInfo contextInfo)
        Type-check a calling expression.
        Overrides:
        typeCheckCaller in class SystemFunction
        Parameters:
        caller - the function call expression calling this function
        visitor - the expression visitor
        contextInfo - static context information relating to the call
        Returns:
        a type-checked replacement for the supplied function call
      • toNumber

        public static DoubleValue toNumber​(AtomicValue arg0)
        The actual implementation logic
        Parameters:
        arg0 - the atomic value to be converted
        Returns:
        the result of the conversion
      • convert

        public static DoubleValue convert​(AtomicValue value,
                                          Configuration config)
        Static method to perform the same conversion as the number() function. This is different from the convert(Type.DOUBLE) in that it produces NaN rather than an error for non-numeric operands.
        Parameters:
        value - the value to be converted
        config - the Saxon configuration
        Returns:
        the result of the conversion
      • getElaborator

        public Elaborator getElaborator()
        Make an elaborator for a system function call on this function
        Overrides:
        getElaborator in class SystemFunction
        Returns:
        a suitable elaborator; or null if no custom elaborator is available