org.norther.tammi.core.util
Class FeatureInfoComparator

java.lang.Object
  extended by org.norther.tammi.core.util.FeatureInfoComparator
All Implemented Interfaces:
Serializable, Comparator

public class FeatureInfoComparator
extends Object
implements Comparator, Serializable

A comparator for feature info of MBeans.

Author:
Ilkka Priha
See Also:
Serialized Form

Constructor Summary
FeatureInfoComparator()
          Constructs a new comparator.
 
Method Summary
protected  int compare(MBeanFeatureInfo info1, MBeanFeatureInfo info2)
          Compares two attribute infos in ascending order.
 int compare(Object info1, Object info2)
          Compares two attribute infos.
 
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
 

Constructor Detail

FeatureInfoComparator

public FeatureInfoComparator()
Constructs a new comparator.

Method Detail

compare

public int compare(Object info1,
                   Object info2)
Compares two attribute infos.

Specified by:
compare in interface Comparator
Parameters:
info1 - the first info to be compared.
info2 - the second info to be compared.
Returns:
-1, 0 or 1 based on comparison.
Throws:
NullPointerException - for null infos.
ClassCastException - if parameters are not infos.

compare

protected int compare(MBeanFeatureInfo info1,
                      MBeanFeatureInfo info2)
Compares two attribute infos in ascending order.

Parameters:
info1 - the first info to be compared.
info2 - the second info to be compared.
Returns:
-1, 0 or 1 based on comparison.
Throws:
NullPointerException - for null infos.


Copyright © 2004 The Norther Organization. All rights reserved.