Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs2-19wi
project07
Commits
cd3a5300
Commit
cd3a5300
authored
6 years ago
by
Adam Blank
Browse files
Options
Download
Email Patches
Plain Diff
Update IPriorityQueue.java
parent
63be1504
master
No related merge requests found
Pipeline
#8802
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/edu/caltech/cs2/interfaces/IPriorityQueue.java
+3
-1
src/edu/caltech/cs2/interfaces/IPriorityQueue.java
with
3 additions
and
1 deletion
+3
-1
src/edu/caltech/cs2/interfaces/IPriorityQueue.java
View file @
cd3a5300
...
...
@@ -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
+
")"
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help