public ResourceQueue(R resource,TxDag waitsFor){
  if (resource == null)   throw new NullPointerException();
  this.resource=resource;
  this.waitsFor=waitsFor;
}

public ResourceQueue ( R resource , TxDag waitsFor ) { if ( resource == null ) throw new NullPointerException ( ) ; this . resource = resource ; this . waitsFor = waitsFor ; }
create a queue of lock requests for a resource .
