com.hp.ucmdb.api.discovery.types
Interface NetworkRange

All Superinterfaces:
java.io.Serializable

public interface NetworkRange
extends java.io.Serializable

Represents a range of IP address of type IPv4.


Method Summary
 void addIP(java.lang.String iP)
          Adds a single IP address to the range defined by this object.
 void addIPRange(java.lang.String startIP, java.lang.String endIP)
          Add an IP range to the range defined by this object.
 NetworkRange withIP(java.lang.String iP)
          Add a single IP address to the range defined by this object.
 NetworkRange withIPRange(java.lang.String startIP, java.lang.String endIP)
          Add an IP range to the range defined by this object.
 

Method Detail

addIP

void addIP(java.lang.String iP)
           throws IllegalNetworkRangeException
Adds a single IP address to the range defined by this object.

Parameters:
iP - a valid IPv4 address ("x.x.x.x").
Throws:
IllegalNetworkRangeException - if the input IP is not of valid format.

addIPRange

void addIPRange(java.lang.String startIP,
                java.lang.String endIP)
                throws IllegalNetworkRangeException
Add an IP range to the range defined by this object.

Parameters:
startIP - the first IP of the range. A valid IPv4 address ("x.x.x.x").
endIP - the last IP of the range. A valid IPv4 address ("x.x.x.x").
Throws:
IllegalNetworkRangeException - if the input IPs are not of valid format or if the startIP is higher than the endIP.

withIP

NetworkRange withIP(java.lang.String iP)
                    throws IllegalNetworkRangeException
Add a single IP address to the range defined by this object.

Parameters:
iP - a valid IPv4 address ("x.x.x.x").
Returns:
this object with the change (for chaining).
Throws:
IllegalNetworkRangeException - if the input IP is not of valid format.

withIPRange

NetworkRange withIPRange(java.lang.String startIP,
                         java.lang.String endIP)
                         throws IllegalNetworkRangeException
Add an IP range to the range defined by this object.

Parameters:
startIP - the first IP of this range. A valid IPv4 address ("x.x.x.x").
endIP - the last IP of this range. A valid IPv4 address ("x.x.x.x").
Returns:
this object with the change (for chaining).
Throws:
IllegalNetworkRangeException - if the input IPs are not of valid format or if the startIP is higher than the endIP.


Documentation Feedback
Copyright 2010 Hewlett-Packard Development Company, L.P.