public boolean isGranted(final T tx){
  if (tx == null) {
    throw new IllegalArgumentException();
  }
  return queue.peek() == tx;
}

public boolean isGranted ( final T tx ) { if ( tx == null ) { throw new IllegalArgumentException ( ) ; } return queue . peek ( ) == tx ; }
return true if the transaction currently holds the lock .
