Exemplo n.º 1
0
 @Override
 public int hashCode() {
   final int PRIME = 31;
   int result = 1;
   result =
       PRIME * result
           + ((acknowledgedTransitions == null) ? 0 : acknowledgedTransitions.hashCode());
   result = PRIME * result + ((alarmState == null) ? 0 : alarmState.hashCode());
   result = PRIME * result + ((objectIdentifier == null) ? 0 : objectIdentifier.hashCode());
   return result;
 }
Exemplo n.º 2
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   final AlarmSummary other = (AlarmSummary) obj;
   if (acknowledgedTransitions == null) {
     if (other.acknowledgedTransitions != null) return false;
   } else if (!acknowledgedTransitions.equals(other.acknowledgedTransitions)) return false;
   if (alarmState == null) {
     if (other.alarmState != null) return false;
   } else if (!alarmState.equals(other.alarmState)) return false;
   if (objectIdentifier == null) {
     if (other.objectIdentifier != null) return false;
   } else if (!objectIdentifier.equals(other.objectIdentifier)) return false;
   return true;
 }
Exemplo n.º 3
0
 @Override
 public void write(ByteQueue queue) {
   objectIdentifier.write(queue);
   alarmState.write(queue);
   acknowledgedTransitions.write(queue);
 }