@Override public boolean equals(Object o) { if (!(o instanceof Movement)) { return false; } Movement movement = (Movement) o; return getId() == movement.getId(); }
@Override public int compareTo(@NonNull Movement movement) { return when.compareTo(movement.getWhen()); }