class DefaultAlarm implements Alarm {

    @Override
    public boolean equals(final Object obj) {
        // Make sure equals() is tune with hashCode() so works ok in a hashSet !
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final DefaultAlarm other = (DefaultAlarm) obj;

        // id or timeRaised or timeUpdated may differ
        if (!Objects.equals(this.deviceId, other.deviceId)) {
            return false;
        }
        if (!Objects.equals(this.description, other.description)) {
            return false;
        }
        if (!Objects.equals(this.source, other.source)) {
            return false;
        }

        if (!Objects.equals(this.timeCleared, other.timeCleared)) {
            return false;
        }
        if (this.severity != other.severity) {
            return false;
        }
        if (this.isServiceAffecting != other.isServiceAffecting) {
            return false;
        }
        if (this.isAcknowledged != other.isAcknowledged) {
            return false;
        }
        if (this.isManuallyClearable != other.isManuallyClearable) {
            return false;
        }
        if (!Objects.equals(this.assignedUser, other.assignedUser)) {
            return false;
        }
        return true;
    }

      DefaultAlarm();
    private  DefaultAlarm(final AlarmId id,
                         final DeviceId deviceId,
                         final String description,
                         final AlarmEntityId source,
                         final long timeRaised,
                         final long timeUpdated,
                         final Long timeCleared,
                         final SeverityLevel severity,
                         final boolean isServiceAffecting,
                         final boolean isAcknowledged,
                         final boolean isManuallyClearable,
                         final String assignedUser);

}