@Override public void removeRequest(int interruptNumber){
synchronized (interruptRequestQueue) {
    InterruptRequest requestToRemove=null;
    for (    InterruptRequest interruptRequest : interruptRequestQueue) {
      if (interruptRequest.getInterruptNumber() == interruptNumber) {
        requestToRemove=interruptRequest;
        break;
      }
    }
    if (requestToRemove != null) {
      interruptRequestQueue.remove(requestToRemove);
    }
  }
}

@ Override public void removeRequest ( int interruptNumber ) { synchronized ( interruptRequestQueue ) { InterruptRequest requestToRemove = null ; for ( InterruptRequest interruptRequest : interruptRequestQueue ) { if ( interruptRequest . getInterruptNumber ( ) == interruptNumber ) { requestToRemove = interruptRequest ; break ; } } if ( requestToRemove != null ) { interruptRequestQueue . remove ( requestToRemove ) ; } } }
this is the way to remove a request by number
