adds an object to a priorityqueue in log size time . it returns the smallest object if any that was dropped off the heap because it was full , or the sentinel value . this can be the given parameter in case it is smaller than the full heap 's minimum , and could n't be added , or another object that was previously the smallest value in the heap and now has been replaced by a larger one , or null if the queue was n't yet full with maxsize elements . concode_field_sep long sentinel concode_elem_sep int size concode_elem_sep int currentCapacity concode_elem_sep int maxSize concode_elem_sep long[] heap concode_field_sep long add concode_elem_sep void downHeap concode_elem_sep void clear concode_elem_sep boolean insert concode_elem_sep long[] sort concode_elem_sep long pop concode_elem_sep void addNoCheck concode_elem_sep long top concode_elem_sep int size concode_elem_sep void upHeap concode_elem_sep int getCurrentCapacity concode_elem_sep void resize concode_elem_sep void initialize concode_elem_sep long updateTop concode_elem_sep long[] getInternalArray
long function ( long arg0 ) { if ( size < maxSize ) { add ( arg0 ) ; return sentinel ; } else if ( arg0 > heap [ 1 ] ) { long loc0 = heap [ 1 ] ; heap [ 1 ] = arg0 ; updateTop ( ) ; return loc0 ; } else { return arg0 ; } }