twaver.alarm
Class AlarmSeverityComparator

java.lang.Object
  extended by twaver.alarm.AlarmSeverityComparator
All Implemented Interfaces:
java.util.Comparator<AlarmSeverity>

public class AlarmSeverityComparator
extends java.lang.Object
implements java.util.Comparator<AlarmSeverity>

The comparator is used to compare alarm severity.

See Also:
AlarmSeverity.setSeverityComparator(Comparator)

Field Summary
static java.util.Comparator<AlarmSeverity> ASCENDING
          This is a default alarm severity comparator.
static java.util.Comparator<AlarmSeverity> DESCENDING
          This is contrary to AlarmSeverityComparator#ASCENDING, the greater value of alarm severity is less serious.
 
Method Summary
 int compare(AlarmSeverity severity1, AlarmSeverity severity2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

ASCENDING

public static final java.util.Comparator<AlarmSeverity> ASCENDING
This is a default alarm severity comparator. the greater value of alarm severity is more serious.


DESCENDING

public static final java.util.Comparator<AlarmSeverity> DESCENDING
This is contrary to AlarmSeverityComparator#ASCENDING, the greater value of alarm severity is less serious.

Method Detail

compare

public int compare(AlarmSeverity severity1,
                   AlarmSeverity severity2)
Specified by:
compare in interface java.util.Comparator<AlarmSeverity>