org.opennms.netmgt.model.discovery
Class IPAddrRange

java.lang.Object
  extended by org.opennms.netmgt.model.discovery.IPAddrRange
All Implemented Interfaces:
Iterable<InetAddress>

public final class IPAddrRange
extends Object
implements Iterable<InetAddress>

The IPAddressRange object is used to encapsulate the starting and ending points of a contiguous IPv4/IPv6 Address range. The class can then generate either an Enumeration or Iterator that can be used to cycle through the range of addresses by the object's user.

Author:
Sowmya , Brian Weaver

Method Summary
 Iterator<InetAddress> iterator()
           Returns an Iterator object that can be used to step through all the address encapsulated in the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

iterator

public Iterator<InetAddress> iterator()

Returns an Iterator object that can be used to step through all the address encapsulated in the object.

The iterator returns objects of type InetAddressor null if the address is unknown.

Specified by:
iterator in interface Iterable<InetAddress>
Returns:
a Iterator object.
See Also:
InetAddress


Copyright © 2011. All Rights Reserved.