protected int compare(Object e,Object object){
  if (comparator == null) {
    @SuppressWarnings("unchecked") Comparable<Object> c=(Comparable<Object>)e;
    return c.compareTo(queue[0]);
  }
 else {
    return comparator.compare(e,queue[0]);
  }
}

protected int compare ( Object e , Object object ) { if ( comparator == null ) { @ SuppressWarnings ( "unchecked" ) Comparable < Object > c = ( Comparable < Object > ) e ; return c . compareTo ( queue [ 0 ] ) ; } else { return comparator . compare ( e , queue [ 0 ] ) ; } }
test if the priority of an object is higher .
