/** * Stelt een job voor met een bepaalde start- en stoptijd (interval). */ public class Job { private final int start, stop; public Job(int start, int stop) { this.start = start; this.stop = stop; } public int getStart() { return start; } public int getStop() { return stop; } public String toString(){ return "[" + start + "," + stop + "]"; } @Override public int hashCode() { int hash = 7; hash = 97 * hash + this.start; hash = 97 * hash + this.stop; return hash; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final Job other = (Job) obj; return this.start == other.start && this.stop == other.stop; } }