I’ve built a program that should keep track of tasks of the workers.
Task is an object.
Each worker has it’s own Task set and there’s also one set which contains all of the tasks.
I want to know how can I find the difference between the whole team set which contains the whole team tasks and a worker.
The task object contains several varibles:
- assignee, prName, taskDescription, status and the priority.
Task{assignee=’ann’, prName=’Data Design’, taskDescription=’Encryption Policy’, status=ASSIGNED, priority=HIGH}
I want to find the difference base on just two of these: “prName and taskDescription”.
I’ve created a new overriden equals method:
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Task task = (Task) o;
return getPrName().equals(task.getPrName()) && getTaskDescription().equals(task.getTaskDescription());
}
and then tried to bigSet.removeAll(smallSet); which didn’t work.
I’d appreciate help on this matter.
thanks.