Code example for PriorityQueue

Methods: poll

0
  public boolean isQueueEmpty() { 
    return queue.isEmpty();  
  } 
 
  InstructionMessage retrieveInstructionMessageAtFrontOfQueue() { 
    return queue.poll(); 
  } 
} 
Contextual code suggestions in your IDE  Get Codota for Java