Package com.tailf.ncs.alarmman.common
Class AlarmId
Object
com.tailf.ncs.alarmman.common.AlarmId
This class represents the unique identity of an NCS alarm. An NCS
alarm is uniquely identified by the following properties:
- managed-device
- alarm-type
- managed-object
- specific-ṕroblem
-
Constructor Summary
ConstructorsConstructorDescriptionAlarmId(ManagedDevice managedDevice, ConfIdentityRef alarmType, ManagedObject managedObject) Constructs anAlarmIdwithspecificProblemset to the empty string "".AlarmId(ManagedDevice managedDevice, ConfIdentityRef alarmType, ManagedObject managedObject, ConfBuf specificProblem) AlarmId(ManagedDevice managedDevice, ConfIdentityRef alarmType, ManagedObject managedObject, String specificProblem) Constructs anAlarmIdwith the specified properties. -
Method Summary
Modifier and TypeMethodDescriptionbooleanA unique Alarm instance is the combination of aManagedDevice, aManagedObject, an alarm-type (ConfIdentityRef) and a specific-problem (ConfBuf).inthashCode()toString()
-
Constructor Details
-
AlarmId
Constructs anAlarmIdwithspecificProblemset to the empty string "".- Parameters:
managedDevice- The managed devicealarmType- Alarm typemanagedObject- The managed object
-
AlarmId
public AlarmId(ManagedDevice managedDevice, ConfIdentityRef alarmType, ManagedObject managedObject, String specificProblem) Constructs anAlarmIdwith the specified properties.- Parameters:
managedDevice- The managed devicealarmType- Alarm typemanagedObject- The managed objectspecificProblem- The Specific problem
-
AlarmId
public AlarmId(ManagedDevice managedDevice, ConfIdentityRef alarmType, ManagedObject managedObject, ConfBuf specificProblem)
-
-
Method Details
-
getAlarmType
- Returns:
- ConfIdentityRef
-
getManagedDevice
- Returns:
- ManagedDevice
-
getManagedObject
- Returns:
- ManagedObject
-
getSpecificProblem
- Returns:
- String
-
toString
-
hashCode
public int hashCode() -
equals
A unique Alarm instance is the combination of a
ManagedDevice, aManagedObject, an alarm-type (ConfIdentityRef) and a specific-problem (ConfBuf).This method compares the specified object with this AlarmId for equality. Returns
trueif and only if the specified object is also an AlarmId and the four properties also test true for equality.Specifically, this implementation first checks if the specified object is this AlarmId. If so, it returns
true; if not, it checks if the specified object is an AlarmId. If not, it returnsfalse; if so, it compares managedDevice, managedObject, alarmType and specificProblem. If any one of these comparisons returnsfalse, this method returnsfalse, otherwise it returnstrue.
-