lojix/prolog/src/main/com/thesett/aima/logic/fol/prolog/expressions/UnaryArithmeticOperator.java
public NumericType getValue()
    {
        Term firstArgValue = arguments[0].getValue();

        // Check that the argument to operate on is a numeric values.
        if (!firstArgValue.isNumber())
        {
            throw new IllegalStateException(
                "instantiation_error, 'arithmetic/2' expects numeric arguments, but the first argument is non-numeric.");
        }

        return evaluate((NumericType) firstArgValue);
    }
public NumericType getValue()
    {
        Term firstArgValue = arguments[0].getValue();

        // Check that the argument to operate on is a numeric values.
        if (!firstArgValue.isNumber())
        {
            throw new IllegalStateException(
                "instantiation_error, 'arithmetic/2' expects numeric arguments, but the first argument is non-numeric.");
        }

        return evaluate((NumericType) firstArgValue);
    }
public NumericType getValue ( ) { Term firstArgValue = arguments [ 0 ] . getValue ( ) ; // Check that the argument to operate on is a numeric values. if ( ! firstArgValue . isNumber ( ) ) { throw new IllegalStateException ( "instantiation_error, 'arithmetic/2' expects numeric arguments, but the first argument is non-numeric." ) ; } return evaluate ( ( NumericType ) firstArgValue ) ; }
Gets the actual value of a term, which is a numeric type equal in value to the arithmetic operator applied to its
argument. This method checks that the argument produces a value which is fully instantiated and numeric when its
{@link Term#getValue()} methods is invoked.

@return A numeric type equal in value to the the arithmetic operator applied to its argument.
Gets the actual value of a term which is a numeric type equal in value to the arithmetic operator applied to its argument . This method checks that the argument produces a value which is fully instantiated and numeric when its { @link Term#getValue () } methods is invoked .