Commit 7cf925eb authored by Adam Blank's avatar Adam Blank
Browse files

Merge branch 'add-generics-to-equals' into 'master'

Add generics to equals



See merge request !9
parents 887ed7c5 21b6d569
......@@ -49,19 +49,32 @@ public class CircularArrayFIFOQueue<E> extends FixedSizeFIFOWorkList<E> {
}
@Override
public int hashCode() {
public int compareTo(FixedSizeFIFOWorkList<E> other) {
// You will implement this method in p2. Leave this method unchanged for p1.
throw new NotYetImplementedException();
}
@Override
@SuppressWarnings("unchecked")
public boolean equals(Object obj) {
// You will implement this method in p2. Leave this method unchanged for p1.
throw new NotYetImplementedException();
// You will finish implementing this method in p2. Leave this method unchanged for p1.
if (this == obj) {
return true;
}
else if (!(obj instanceof FixedSizeFIFOWorkList<?>)) {
return false;
}
else {
FixedSizeFIFOWorkList<E> other = (FixedSizeFIFOWorkList<E>) obj;
// Your code goes here
throw new NotYetImplementedException();
}
}
@Override
public int compareTo(FixedSizeFIFOWorkList<E> o) {
public int hashCode() {
// You will implement this method in p2. Leave this method unchanged for p1.
throw new NotYetImplementedException();
}
......
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