public class ChatteringAlarmsContainer.ChatteringAlarm extends java.lang.Object implements java.lang.Comparable<ChatteringAlarmsContainer.ChatteringAlarm>
Comparable orders items by number of activations.
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
ID
The ID of the alarm
|
protected int |
numActive
The number of ACTIVE alarms received in a minute
|
protected int |
numTerminate
The number of Terminate alarms received in a minute
|
protected java.sql.Timestamp |
timestamp
The time when the chattering event has been registered
|
| Modifier | Constructor and Description |
|---|---|
|
ChatteringAlarm(java.lang.String id,
int nAct,
int nTerm,
java.sql.Timestamp time)
Constructor
|
protected |
ChatteringAlarm(java.lang.String id,
java.sql.Timestamp time)
Build a ChatteringAlarm with no alarms.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ChatteringAlarmsContainer.ChatteringAlarm o) |
int |
getNumActive()
Getter
|
int |
getNumTerminate()
Getter
|
java.sql.Timestamp |
getTimestamp()
Getter
|
int |
getTotAlarms() |
void |
update(int nAct,
int nTerm,
java.sql.Timestamp time)
Update the number of this alarm but only if
the new ones are worst then previously registered.
|
public final java.lang.String ID
protected int numActive
protected int numTerminate
protected java.sql.Timestamp timestamp
protected ChatteringAlarm(java.lang.String id,
java.sql.Timestamp time)
id - The ID of the alarmtime - The time when the chattering has been registeredpublic ChatteringAlarm(java.lang.String id,
int nAct,
int nTerm,
java.sql.Timestamp time)
id - The ID of the alarmnAct - Number of active alarms in a minutenTerm - Number of terminate alarms in a minutetime - The time when the chattering has been registeredpublic int getNumActive()
public int getNumTerminate()
public int getTotAlarms()
public void update(int nAct,
int nTerm,
java.sql.Timestamp time)
nAct - Number of active alarms in a minutenTerm - Number of terminate alarms in a minutetime - The time when the chattering has been registeredpublic java.sql.Timestamp getTimestamp()
public int compareTo(ChatteringAlarmsContainer.ChatteringAlarm o)
compareTo in interface java.lang.Comparable<ChatteringAlarmsContainer.ChatteringAlarm>