From the Java API documentation:
Conditionfactors out theObjectmonitor methods (wait,notifyandnotifyAll) into distinct objects to give the effect of having multiple wait-sets per object, by combining them with the use of arbitrary Lock implementations. Where aLockreplaces the use ofsynchronizedmethods and statements, aConditionreplaces the use of theObjectmonitor methods.
The purpose of implementing the Condition interface is to gain access to its more nuanced await methods. Therefore,
calling the method Object.wait(...) on a class implementing the Condition interface is silly and confusing.
final Lock lock = new ReentrantLock(); final Condition notFull = lock.newCondition(); ... notFull.wait();
final Lock lock = new ReentrantLock(); final Condition notFull = lock.newCondition(); ... notFull.await();