Interface MaleAnalogExpressionSocket

    • Method Detail

      • evaluate

        double evaluate()
                 throws JmriException
        Evaluate this expression.

        This method must ensure that the result is not a Double.NaN, negative infinity or positive infinity. If that is the case, it must throw an IllegalArgumentException before checking if an error has occured.

        If the socket is not enabled, the method returns the value 0.0f.

        If an error occurs and are handled, the method returns the value 0.0f.

        Specified by:
        evaluate in interface AnalogExpression
        Returns:
        the result of the evaluation. The male socket that holds this expression throws an exception if this value is a Double.NaN or an infinite number.
        Throws:
        JmriException - when an exception occurs
        java.lang.IllegalArgumentException - if the result a Double.NaN, negative infinity or positive infinity