public class IltAlarmCountAttributeType extends Object implements Comparable
IltObject
alarm count attributes. The main
feature of this class is the implementation of the Comparable
interface that allows you to sort by an attribute of this type.
Note: this class has a natural ordering that is inconsistent with equals.
IltObject.AlarmCountAttribute
,
IltObject.NewAlarmCountAttribute
Constructor and Description |
---|
IltAlarmCountAttributeType(boolean isNotReporting,
boolean isLossOfConnectivity,
String countText)
Creates a new instance.
|
IltAlarmCountAttributeType(int count,
IltAlarmSeverity highestOutstandingSeverity,
boolean hasOtherLessSevereAlarms,
String countText)
Creates a new instance.
|
IltAlarmCountAttributeType(int count,
IltAlarmSeverity highestOutstandingSeverity,
IltAlarmSeverity highestNewSeverity,
IltAlarmSeverity highestAcknowledgedSeverity,
boolean hasOtherLessSevereAlarms,
String countText,
boolean notReporting,
boolean lossOfConnectivity) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o)
The order is the following:
(1) Count with new alarms first, sorted by decreasing "new" severity
same new severity:
highest outstanding severity first
same outstanding severity: largest count first
same count: hasLessSevereAlarms first
same hasLessSevereAlarms: no acknowledged alarm first
then highest acknowledged severity first
(2) Count with no new alarms last, sorted by decreasing "ack" severity
same ack severity:
highest outstanding severity first
same outstanding severity: largest count first
same count: hasLessSevereAlarms first
|
boolean |
equals(Object object)
Compares two objects.
|
IltAlarmSeverity |
getAcknowledgedSeverity()
Returns the severity of acknowledged alarms represented by this alarm
count.
|
String |
getAlarmCountString()
Returns the alarm count as a
String computed by the
JTGO alarm mapping. |
int |
getAlarmNumber()
Returns the number of alarms represented by this alarm count.
|
IltAlarm.Severity |
getAlarmSeverity()
Deprecated.
Please use method
getSeverity instead. |
IltAlarmSeverity |
getNewSeverity()
Returns the severity of new alarms represented by this alarm count.
|
IltAlarmSeverity |
getSeverity()
Returns the alarm severity represented by this alarm count.
|
boolean |
hasOtherLessSevereAlarms()
Returns
true if other less severe alarms are represented by
this alarm count, otherwise it returns false . |
boolean |
isLossOfConnectivity()
Returns
true if the alarm count represents the
state "Loss of Connectivity", otherwise it returns false . |
boolean |
isNotReporting()
Returns
true if the alarm count represents the
state "Not Reporting", otherwise it returns false . |
String |
toString()
Converts the object into a human-readable format.
|
public IltAlarmCountAttributeType(boolean isNotReporting, boolean isLossOfConnectivity, String countText)
isNotReporting
- Whether the alarm is reporting or notisLossOfConnectivity
- Whether the alarm is loss of connectivity
or notcountText
- The counter text for this alarmpublic IltAlarmCountAttributeType(int count, IltAlarmSeverity highestOutstandingSeverity, boolean hasOtherLessSevereAlarms, String countText)
count
- The count for this alarmhighestOutstandingSeverity
- The highest severity for this alarmhasOtherLessSevereAlarms
- Whether there are less severe alarms
or notcountText
- The counter text for this alarmpublic IltAlarmCountAttributeType(int count, IltAlarmSeverity highestOutstandingSeverity, IltAlarmSeverity highestNewSeverity, IltAlarmSeverity highestAcknowledgedSeverity, boolean hasOtherLessSevereAlarms, String countText, boolean notReporting, boolean lossOfConnectivity)
public int getAlarmNumber()
@Deprecated public IltAlarm.Severity getAlarmSeverity()
getSeverity
instead.public IltAlarmSeverity getSeverity()
public IltAlarmSeverity getNewSeverity()
public IltAlarmSeverity getAcknowledgedSeverity()
public boolean hasOtherLessSevereAlarms()
true
if other less severe alarms are represented by
this alarm count, otherwise it returns false
.public String getAlarmCountString()
String
computed by the
JTGO alarm mapping.public boolean isNotReporting()
true
if the alarm count represents the
state "Not Reporting", otherwise it returns false
.public boolean isLossOfConnectivity()
true
if the alarm count represents the
state "Loss of Connectivity", otherwise it returns false
.public String toString()
public boolean equals(Object object)
public int compareTo(Object o)
compareTo
in interface Comparable
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.