public final Collection<Thread> getWaitingThreads(ConditionObject condition) {
        if (!owns(condition))
            throw new IllegalArgumentException("Not owner");
        return condition.getWaitingThreads();
    }
public final Collection < Thread > getWaitingThreads ( ConditionObject condition ) { if ( ! owns ( condition ) ) throw new IllegalArgumentException ( "Not owner" ) ; return condition . getWaitingThreads ( ) ; }
Returns a collection containing those threads that may be
waiting on the given condition associated with this
synchronizer.  Because the actual set of threads may change
dynamically while constructing this result, the returned
collection is only a best-effort estimate. The elements of the
returned collection are in no particular order.

@param condition the condition
@return the collection of threads
@throws IllegalMonitorStateException if exclusive synchronization
is not held
@throws IllegalArgumentException if the given condition is
not associated with this synchronizer
@throws NullPointerException if the condition is null