@Override @SuppressWarnings("unchecked") public boolean remove(Object o){
  if (o == null) {
    return false;
  }
  for (int targetIndex=0; targetIndex < size; targetIndex++) {
    if (o.equals(elements[targetIndex])) {
      removeAt(targetIndex);
      return true;
    }
  }
  return false;
}

@ Override @ SuppressWarnings ( "unchecked" ) public boolean remove ( Object o ) { if ( o == null ) { return false ; } for ( int targetIndex = 0 ; targetIndex < size ; targetIndex ++ ) { if ( o . equals ( elements [ targetIndex ] ) ) { removeAt ( targetIndex ) ; return true ; } } return false ; }
removes the specified object from the priority queue .
