xmlBlaster 2.1.0 API

org.xmlBlaster.engine.runlevel
Class PluginConfigComparator

java.lang.Object
  extended by 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
           
 
Constructor Summary
PluginConfigComparator(Global glob, boolean isAscending)
           
 
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
 

Field Detail

ME

private java.lang.String ME

glob

private final Global glob

log

private static java.util.logging.Logger log

isAscending

private boolean isAscending
Constructor Detail

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.
Method Detail

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

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.