public int compare(Prioritized prioritized1, Prioritized prioritized2) {
         if (prioritized1 == null) {
            return -1;
         }
         if (prioritized2 == null) {
            return 1;
         }
         if (prioritized1.getPriority() < prioritized2.getPriority()) {
            return -1;
         } else if (prioritized1.getPriority() > prioritized2.getPriority()) {
            return 1;
         } else {
            return 0;
         }
      }