Commit cd3a5300 authored by Adam Blank's avatar Adam Blank
Browse files

Update IPriorityQueue.java

parent 63be1504
No related merge requests found
Pipeline #8802 canceled with stage
Showing with 3 additions and 1 deletion
+3 -1
......@@ -15,10 +15,12 @@ public interface IPriorityQueue<E> extends IQueue<IPriorityQueue.PQElement<E>> {
this.priority = priority;
}
@Override
public int hashCode() {
return this.data.hashCode();
}
@Override
public boolean equals(Object o) {
if (!(o instanceof PQElement)) {
return false;
......@@ -26,7 +28,7 @@ public interface IPriorityQueue<E> extends IQueue<IPriorityQueue.PQElement<E>> {
return this.data.equals(((PQElement)o).data);
}
@Override
public String toString() {
return "(" + this.data + ", " + this.priority + ")";
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment