void setPriority(double priority) {
        if (priority < 0 || Double.isNaN(priority)) {
            throw new IllegalArgumentException("invalid priority: " + priority);
        }
        this.priority = priority;
    }
void setPriority ( double priority ) { if ( priority < 0 || Double . isNaN ( priority ) ) { throw new IllegalArgumentException ( "invalid priority: " + priority ) ; } this . priority = priority ; }
@throws IllegalArgumentException if the given priority is negative or {@link Double#NaN}.