private Node addConditionWaiter(){
  Node t=lastWaiter;
  if (t != null && t.waitStatus != Node.CONDITION) {
    unlinkCancelledWaiters();
    t=lastWaiter;
  }
  Node node=new Node(Thread.currentThread(),Node.CONDITION);
  if (t == null)   firstWaiter=node;
 else   t.nextWaiter=node;
  lastWaiter=node;
  return node;
}

private Node addConditionWaiter ( ) { Node t = lastWaiter ; if ( t != null && t . waitStatus != Node . CONDITION ) { unlinkCancelledWaiters ( ) ; t = lastWaiter ; } Node node = new Node ( Thread . currentThread ( ) , Node . CONDITION ) ; if ( t == null ) firstWaiter = node ; else t . nextWaiter = node ; lastWaiter = node ; return node ; }
adds a new waiter to wait queue .
