returns a counter whose keys are the elements in this priority queue , and whose counts are the priorities in this queue . in the event there are multiple instances of the same element in the queue , the counter 's count will be the sum of the instances ' priorities . concode_field_sep double[] priorities concode_elem_sep int size concode_elem_sep List<E> elements concode_elem_sep int capacity concode_field_sep E next concode_elem_sep boolean add concode_elem_sep int parent concode_elem_sep void grow concode_elem_sep void swap concode_elem_sep void heapifyDown concode_elem_sep boolean isEmpty concode_elem_sep boolean hasNext concode_elem_sep void main concode_elem_sep void remove concode_elem_sep E peek concode_elem_sep int leftChild concode_elem_sep int size concode_elem_sep void removeFirst concode_elem_sep double getPriority concode_elem_sep PriorityQueue<E> clone concode_elem_sep int rightChild concode_elem_sep String toString concode_elem_sep String toString concode_elem_sep void heapifyUp
Counter function ( ) { PriorityQueue < E > loc0 = clone ( ) ; Counter < E > loc1 = new Counter < E > ( ) ; while ( loc0 . hasNext ( ) ) { double loc2 = loc0 . getPriority ( ) ; E loc3 = loc0 . next ( ) ; loc1 . incrementCount ( loc3 , loc2 ) ; } return loc1 ; }