I have a program that I'm writing that needs to use a priority queue as part of an algorithm. I specifically need to order (String, Integer) pairs for example (Bread, 3), (Beer, 5), (Eggs,2), etc.I'd appreciate any comments on my code style and how I've written my class.import javafx.util.Pair;import java.util.ArrayList;import java.util.Collections;public class FPPriorityQueue implements PriorityQueue {private ArrayList<Pair<String, Integer>> heapArray;public FPPriorityQueue(){    super();    heapArray = new ArrayList<Pair<String, Integer>>();}public boolean empty(){    return true;}private Integer getParentData(int index){    int parentIndex = index/2;    Pair<String, Integer> parentData = heapArray.get(parentIndex);    return parentData.getValue();}private void swap(Integer old, Integer knew){    Collections.swap(heapArray,old,knew);}private void shiftUp(int index){    int parentIndex;    if(index != 1){        parentIndex = index/2;        int childData = heapArray.get(index).getValue();        int parentData = getParentData(index);        if(parentData < childData){            swap(parentIndex,index);            shiftUp(parentIndex);        }    }}private void shiftDown(int index){    if(heapArray.size()> (index*2)+1) {        int leftChildValue = heapArray.get(index * 2).getValue();        int rightChildValue = heapArray.get((index * 2) + 1).getValue();        int indexValue = heapArray.get(index).getValue();        if(indexValue < leftChildValue || indexValue < rightChildValue)        {            if(leftChildValue > rightChildValue){                int leftChildIndex = index*2;                swap(index,leftChildIndex);                shiftDown(leftChildIndex);            }            else{                int rightChildIndex = (index*2)+1;                swap(index,rightChildIndex);                shiftDown(rightChildIndex);            }        }    }}public void insert(String key, Integer value){    Pair<String, Integer> element = new Pair<String, Integer>(key,value);    Pair<String, Integer> nullElement = new Pair<String, Integer>(NULL,0);    //add the element to the last position in the list    if(heapArray.isEmpty()){        heapArray.add(0,nullElement);        heapArray.add(1,element);    }    else{        heapArray.add(heapArray.size(), element);        shiftUp(heapArray.size()-1);    }}public Pair<String, Integer> removeMax(){    Pair<String, Integer> returnValue = heapArray.remove(1);    Collections.swap(heapArray,heapArray.size()-1,1);    shiftDown(1);    return returnValue;}}
Max-Heap arraylist based priority queue written in Java
java;algorithm;queue