OpenNMS API 1.2.3

org.opennms.netmgt.discovery
Class DiscoveredIPMgr.AddrComparator

java.lang.Object
  extended byorg.opennms.netmgt.discovery.DiscoveredIPMgr.AddrComparator
All Implemented Interfaces:
java.util.Comparator
Enclosing class:
DiscoveredIPMgr

static final class DiscoveredIPMgr.AddrComparator
extends java.lang.Object
implements java.util.Comparator

This class implements the Comparator interface and provides the infomation required for a Tree to be sorted. This implementation only works with objects of type InetAddress.

Author:
Brian Weaver , OpenNMS

Field Summary
(package private) static DiscoveredIPMgr.AddrComparator comparator
          Singular instance of the comparator that can be used in multiple trees.
 
Constructor Summary
(package private) DiscoveredIPMgr.AddrComparator()
           
 
Method Summary
 int compare(java.lang.Object a, java.lang.Object b)
          The compare method returns the difference between to objects.
 
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

comparator

static final DiscoveredIPMgr.AddrComparator comparator
Singular instance of the comparator that can be used in multiple trees.

Constructor Detail

DiscoveredIPMgr.AddrComparator

DiscoveredIPMgr.AddrComparator()
Method Detail

compare

public int compare(java.lang.Object a,
                   java.lang.Object b)
The compare method returns the difference between to objects. This method expects both instances to be instances of InetAddressor null.

Specified by:
compare in interface java.util.Comparator
Parameters:
a - an instance of an InetAddress.
b - an instance of an InetAddress.
Returns:
less than zero if a < b, zero if a==b, or greater than zero if a > b.

OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.