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

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