Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.appdef.shared
Class AppdefCompatGrpComparator

java.lang.Object
  extended by org.hyperic.hq.appdef.shared.AppdefCompatGrpComparator
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator

public class AppdefCompatGrpComparator
extends java.lang.Object
implements java.util.Comparator, java.io.Serializable

A comparator that will order two AppdefEntityIDs according to the position of their instanceId in an int array. This order specification deliberately omits appdef type because this comparator is only intended for use within a compatible group where type is consistent.

See Also:
Serialized Form

Constructor Summary
AppdefCompatGrpComparator(int[] orderSpec)
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compare two AppdefEntityIDs and indicate their order according the the order specification array passed into the constructor.
 
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

AppdefCompatGrpComparator

public AppdefCompatGrpComparator(int[] orderSpec)
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compare two AppdefEntityIDs and indicate their order according the the order specification array passed into the constructor.

Specified by:
compare in interface java.util.Comparator
Parameters:
instance - of AppdefEntityID number 1
instance - of AppdefEntityID number 2
Returns:
-1,0,1 for less than, equals and greater than

Hyperic HQ Plugin API v. 4.4.0.2

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.