code: protected Collection<Thread> getWaitingThreads(Condition condition) {
          if (condition == null)
              throw new NullPointerException();
          if (!(condition instanceof AbstractQueuedSynchronizer.ConditionObject))
              throw new IllegalArgumentException("not owner");
          return sync.getWaitingThreads((AbstractQueuedSynchronizer.ConditionObject)condition);
      }
docs: Returns a collection containing those threads that may be
  waiting on the given condition associated with this lock.
  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.  This method is designed to
  facilitate construction of subclasses that provide more
  extensive condition monitoring facilities.
  
  @param condition the condition
  @return the collection of threads
  @throws IllegalMonitorStateException if this lock is not held
  @throws IllegalArgumentException if the given condition is
  not associated with this lock
  @throws NullPointerException if the condition is null