OpenNMS API 1.2.9

## org.opennms.netmgt.capsd
Class KnownIPMgr.AddrComparator

    java.lang.Object
      org.opennms.netmgt.capsd.KnownIPMgr.AddrComparator

All Implemented Interfaces:
  java.util.Comparator

Enclosing class:
  KnownIPMgr

static final class KnownIPMgr.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 KnownIPMgr.AddrComparator` `comparator` Singular instance of the comparator that can be used in multiple trees.

Constructor Summary
`(package private)` `KnownIPMgr.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 KnownIPMgr.AddrComparator comparator

  Singular instance of the comparator that can be used in multiple trees.

Constructor Detail

### KnownIPMgr.AddrComparator

    KnownIPMgr.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 `InetAddress`or `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.9

Generated by ranger on May 19 2007 2335.