</BUG>
return false;
}
if (!added || !heap.contains(item)) {
System.err.println(name+" YIKES!! " + item + " doesn't exists but has been added.");
<BUG>Utils.handleError(heap);
</BUG>
return false;
}
}

for (int i = 0; i < unsorted.length; i++) {
T item = Utils.parseT(unsorted[i], type);
boolean added = heap.add(item);
if (!heap.validate() || (heap.size() != i+1)) {
System.err.println(name+" YIKES!! " + item + " caused a size mismatch.");
Utils.handleError(sorted,heap);
return false;
}
if (!added || !heap.contains(item)) {
System.err.println(name+" YIKES!! " + item + " doesn't exists but has been added.");
Utils.handleError(sorted,heap);
return false;
}
}
