src/main/java/org/funz/calculator/Calculator.java
public void checkAvailability() {
        if (_unavailables == null || _unavailable_tests == null || _calendar.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY || _calendar.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY) {
            if (!_isAvailable) {
                setActivity(IDLE_STATE, "checkAvailability");
            }
            //System.err("_isAvailable = true");
            _isAvailable = true;
            return;
        }

        boolean av = checkTimeAvailability() && checkTestAvailability();

        if (av && (!_isAvailable)) {
            setActivity(IDLE_STATE, "av && (!_isAvailable)");
        } else if ((!av) && _isAvailable) {
            setActivity(UNAVAILABLE_STATE, "(!av) && _isAvailable");
            if (_reserver != null) {
                _reserver.askToStop(false, "checkTimeAvailability() && checkTestAvailability()");
            }
            _reserver = null;
        }
        //System.err(" _isAvailable = av = "+av);
        _isAvailable = av;
        return;
    }
/**
     * Checks whether the calculator is not inside an unavailable condition.
     */
Checks whether the calculator is not inside an unavailable condition.
Checks whether the calculator is not inside an unavailable condition .
public void checkAvailability() {
        if (_unavailables == null || _unavailable_tests == null || _calendar.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY || _calendar.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY) {
            if (!_isAvailable) {
                setActivity(IDLE_STATE, "checkAvailability");
            }
            _isAvailable = true;
            return;
        }
        boolean av = checkTimeAvailability() && checkTestAvailability();
        if (av && (!_isAvailable)) {
            setActivity(IDLE_STATE, "av && (!_isAvailable)");
        } else if ((!av) && _isAvailable) {
            setActivity(UNAVAILABLE_STATE, "(!av) && _isAvailable");
            if (_reserver != null) {
                _reserver.askToStop(false, "checkTimeAvailability() && checkTestAvailability()");
            }
            _reserver = null;
        }
        _isAvailable = av;
        return;
    }
public void checkAvailability ( ) { if ( _unavailables == null || _unavailable_tests == null || _calendar . get ( Calendar . DAY_OF_WEEK ) == Calendar . SUNDAY || _calendar . get ( Calendar . DAY_OF_WEEK ) == Calendar . SATURDAY ) { if ( ! _isAvailable ) { setActivity ( IDLE_STATE , "checkAvailability" ) ; } _isAvailable = true ; return ; } boolean av = checkTimeAvailability ( ) && checkTestAvailability ( ) ; if ( av && ( ! _isAvailable ) ) { setActivity ( IDLE_STATE , "av && (!_isAvailable)" ) ; } else if ( ( ! av ) && _isAvailable ) { setActivity ( UNAVAILABLE_STATE , "(!av) && _isAvailable" ) ; if ( _reserver != null ) { _reserver . askToStop ( false , "checkTimeAvailability() && checkTestAvailability()" ) ; } _reserver = null ; } _isAvailable = av ; return ; }
Checks whether the calculator is not inside an unavailable condition.
Checks whether the calculator is not inside an unavailable condition .
//System.err("_isAvailable = true"); //System.err(" _isAvailable = av = "+av);