You are on page 1of 1

interface Comparable <Process> +compareTo(in other : Process) : int PriorityClass -BACKGROUND -NORMAL interface Queue <Process> +clear() : void

+isEmpty() : Boolean +size() : int +add(in element : Process) : Boolean +offer(in element : Process) : Boolean +peek() : Process +head() : Process -PriorityClass : PriorityClass -lastRan : Long +Process() : void +Process(in pClass : PriorityClass) : void +Process(in pClass : PriorityClass, in lastRan : Long) : void +getPriorityClass() : PriorityClass +getLastRan() : Long +compareTo(in other : Process) : int +priorityClassEqualTo(in other : Process) : Boolean +isGreaterThan(in other : Process) : Boolean +toString() : String +setLastRan(in lastRan : Long) : void 1 -composed of Process -apart of 1 Comparable <Process> -CRITICAL -stringRepresentation : String -priority : Integer -PriorityClass(in stringRepresentation : String, in priority : Integer) : void +toString() : String +getPriorityValue() : Integer

-stored in

Queue <Process> -heap : ArrayList <Process> PriorityQueue +clear() : void +isEmpty() : Boolean +size() : int +add(in element : Process) : Boolean +offer(in element : Process) : Boolean +peek() : Process +head() : Process -composed of 1

ProcessHeap +ProcessHeap(in list : ArrayList <Process>) : void +sort() : void -heapSort(in heap : ArrayList <Process>, in unsortedLimit : int) : void +buildMaxHeap() : void -maxHeapify(in index : int, in limit : int) : void -getProcessAt(in index : int) : Process -leftChildIndex(in index : int) : int -rightChildIndex(in index : int) : int -firstParentIndex() : int -exchange(in indexA : int, in indexB : int) : void +asLinearString() : String

You might also like