Skip to content
Snippets Groups Projects
Commit acf7be25 authored by Vesa Lappalainen's avatar Vesa Lappalainen :bicyclist:
Browse files

live12

parent eb554d68
No related branches found
No related tags found
No related merge requests found
......@@ -73,4 +73,20 @@ public class Aika implements AikaRajapinta { // luokka
return String.format("%02d:%02d", this.h, this.m);
}
public boolean equals(Object o) {
if (!(o instanceof AikaRajapinta))
return false;
AikaRajapinta a = (AikaRajapinta) o;
return getH() == a.getH() && getM() == a.getM();
}
@Override
public int hashCode() {
// TODO Auto-generated method stub
return this.h * 3600 + this.m * 60;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment