org.xmlBlaster.engine.runlevel
Class PluginConfigComparator
java.lang.Object
org.xmlBlaster.engine.runlevel.PluginConfigComparator
- All Implemented Interfaces:
- java.util.Comparator
public class PluginConfigComparator
- extends java.lang.Object
- implements java.util.Comparator
This class is used to compare PluginConfig objects with eachother.
- Author:
- Michele Laghi
Field Summary |
private Global |
glob
|
private boolean |
isAscending
|
private static java.util.logging.Logger |
log
|
private java.lang.String |
ME
|
Method Summary |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compares its two arguments for order. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this Comparator. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ME
private java.lang.String ME
glob
private final Global glob
log
private static java.util.logging.Logger log
isAscending
private boolean isAscending
PluginConfigComparator
public PluginConfigComparator(Global glob,
boolean isAscending)
- Parameters:
glob
- the global object. A util.Global is sufficient here.isAscending
- 'true' if you want to use this comparator for increasing
(ascending) runlevels, i.e. for startup sequences. 'false' if you want
to use it for descending (shutdown) sequences.
compare
public final int compare(java.lang.Object o1,
java.lang.Object o2)
- Compares its two arguments for order. Returns a negative integer, zero, or a
positive integer as the first argument is less than, equal to, or greater
than the second. Null objects are considered of different type and therefore
will throw a runtime exception (ClassCastException).
- Specified by:
compare
in interface java.util.Comparator
equals
public boolean equals(java.lang.Object obj)
- Indicates whether some other object is "equal to" this Comparator.
- Specified by:
equals
in interface java.util.Comparator
- Overrides:
equals
in class java.lang.Object
Copyright © 1999-2014 The xmlBlaster.org contributers.