org.opennms.netmgt.config.datacollection
Class IpList

java.lang.Object
  extended by org.opennms.netmgt.config.datacollection.IpList
All Implemented Interfaces:
Serializable

public class IpList
extends Object
implements Serializable

list of IP address or IP address mask values to which this system definition applies.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary
IpList()
           
 
Method Summary
 void addIpAddr(int index, String vIpAddr)
           
 void addIpAddr(String vIpAddr)
           
 void addIpAddrMask(int index, String vIpAddrMask)
           
 void addIpAddrMask(String vIpAddrMask)
           
 Enumeration<String> enumerateIpAddr()
          Method enumerateIpAddr.
 Enumeration<String> enumerateIpAddrMask()
          Method enumerateIpAddrMask.
 String[] getIpAddr()
          Method getIpAddr.Returns the contents of the collection in an Array.
 String getIpAddr(int index)
          Method getIpAddr.
 List<String> getIpAddrCollection()
          Method getIpAddrCollection.Returns a reference to '_ipAddrList'.
 int getIpAddrCount()
          Method getIpAddrCount.
 String[] getIpAddrMask()
          Method getIpAddrMask.Returns the contents of the collection in an Array.
 String getIpAddrMask(int index)
          Method getIpAddrMask.
 List<String> getIpAddrMaskCollection()
          Method getIpAddrMaskCollection.Returns a reference to '_ipAddrMaskList'.
 int getIpAddrMaskCount()
          Method getIpAddrMaskCount.
 boolean isValid()
          Method isValid.
 Iterator<String> iterateIpAddr()
          Method iterateIpAddr.
 Iterator<String> iterateIpAddrMask()
          Method iterateIpAddrMask.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllIpAddr()
           
 void removeAllIpAddrMask()
           
 boolean removeIpAddr(String vIpAddr)
          Method removeIpAddr.
 String removeIpAddrAt(int index)
          Method removeIpAddrAt.
 boolean removeIpAddrMask(String vIpAddrMask)
          Method removeIpAddrMask.
 String removeIpAddrMaskAt(int index)
          Method removeIpAddrMaskAt.
 void setIpAddr(int index, String vIpAddr)
           
 void setIpAddr(List<String> vIpAddrList)
          Sets the value of '_ipAddrList' by copying the given Vector.
 void setIpAddr(String[] vIpAddrArray)
           
 void setIpAddrCollection(List<String> ipAddrList)
          Deprecated.  
 void setIpAddrMask(int index, String vIpAddrMask)
           
 void setIpAddrMask(List<String> vIpAddrMaskList)
          Sets the value of '_ipAddrMaskList' by copying the given Vector.
 void setIpAddrMask(String[] vIpAddrMaskArray)
           
 void setIpAddrMaskCollection(List<String> ipAddrMaskList)
          Deprecated.  
static IpList unmarshal(Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IpList

public IpList()
Method Detail

addIpAddr

public void addIpAddr(String vIpAddr)
               throws IndexOutOfBoundsException
Parameters:
vIpAddr -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addIpAddr

public void addIpAddr(int index,
                      String vIpAddr)
               throws IndexOutOfBoundsException
Parameters:
index -
vIpAddr -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addIpAddrMask

public void addIpAddrMask(String vIpAddrMask)
                   throws IndexOutOfBoundsException
Parameters:
vIpAddrMask -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addIpAddrMask

public void addIpAddrMask(int index,
                          String vIpAddrMask)
                   throws IndexOutOfBoundsException
Parameters:
index -
vIpAddrMask -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateIpAddr

public Enumeration<String> enumerateIpAddr()
Method enumerateIpAddr.

Returns:
an Enumeration over all possible elements of this collection

enumerateIpAddrMask

public Enumeration<String> enumerateIpAddrMask()
Method enumerateIpAddrMask.

Returns:
an Enumeration over all possible elements of this collection

getIpAddr

public String getIpAddr(int index)
                 throws IndexOutOfBoundsException
Method getIpAddr.

Parameters:
index -
Returns:
the value of the java.lang.String at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getIpAddr

public String[] getIpAddr()
Method getIpAddr.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getIpAddrCollection

public List<String> getIpAddrCollection()
Method getIpAddrCollection.Returns a reference to '_ipAddrList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getIpAddrCount

public int getIpAddrCount()
Method getIpAddrCount.

Returns:
the size of this collection

getIpAddrMask

public String getIpAddrMask(int index)
                     throws IndexOutOfBoundsException
Method getIpAddrMask.

Parameters:
index -
Returns:
the value of the java.lang.String at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getIpAddrMask

public String[] getIpAddrMask()
Method getIpAddrMask.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getIpAddrMaskCollection

public List<String> getIpAddrMaskCollection()
Method getIpAddrMaskCollection.Returns a reference to '_ipAddrMaskList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getIpAddrMaskCount

public int getIpAddrMaskCount()
Method getIpAddrMaskCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

iterateIpAddr

public Iterator<String> iterateIpAddr()
Method iterateIpAddr.

Returns:
an Iterator over all possible elements in this collection

iterateIpAddrMask

public Iterator<String> iterateIpAddrMask()
Method iterateIpAddrMask.

Returns:
an Iterator over all possible elements in this collection

marshal

public void marshal(Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

marshal

public void marshal(ContentHandler handler)
             throws IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
handler -
Throws:
IOException - if an IOException occurs during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling

removeAllIpAddr

public void removeAllIpAddr()

removeAllIpAddrMask

public void removeAllIpAddrMask()

removeIpAddr

public boolean removeIpAddr(String vIpAddr)
Method removeIpAddr.

Parameters:
vIpAddr -
Returns:
true if the object was removed from the collection.

removeIpAddrAt

public String removeIpAddrAt(int index)
Method removeIpAddrAt.

Parameters:
index -
Returns:
the element removed from the collection

removeIpAddrMask

public boolean removeIpAddrMask(String vIpAddrMask)
Method removeIpAddrMask.

Parameters:
vIpAddrMask -
Returns:
true if the object was removed from the collection.

removeIpAddrMaskAt

public String removeIpAddrMaskAt(int index)
Method removeIpAddrMaskAt.

Parameters:
index -
Returns:
the element removed from the collection

setIpAddr

public void setIpAddr(int index,
                      String vIpAddr)
               throws IndexOutOfBoundsException
Parameters:
index -
vIpAddr -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setIpAddr

public void setIpAddr(String[] vIpAddrArray)
Parameters:
vIpAddrArray -

setIpAddr

public void setIpAddr(List<String> vIpAddrList)
Sets the value of '_ipAddrList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vIpAddrList - the Vector to copy.

setIpAddrCollection

public void setIpAddrCollection(List<String> ipAddrList)
Deprecated. 

Sets the value of '_ipAddrList' by setting it to the given Vector. No type checking is performed.

Parameters:
ipAddrList - the Vector to set.

setIpAddrMask

public void setIpAddrMask(int index,
                          String vIpAddrMask)
                   throws IndexOutOfBoundsException
Parameters:
index -
vIpAddrMask -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setIpAddrMask

public void setIpAddrMask(String[] vIpAddrMaskArray)
Parameters:
vIpAddrMaskArray -

setIpAddrMask

public void setIpAddrMask(List<String> vIpAddrMaskList)
Sets the value of '_ipAddrMaskList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vIpAddrMaskList - the Vector to copy.

setIpAddrMaskCollection

public void setIpAddrMaskCollection(List<String> ipAddrMaskList)
Deprecated. 

Sets the value of '_ipAddrMaskList' by setting it to the given Vector. No type checking is performed.

Parameters:
ipAddrMaskList - the Vector to set.

unmarshal

public static IpList unmarshal(Reader reader)
                        throws org.exolab.castor.xml.MarshalException,
                               org.exolab.castor.xml.ValidationException
Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled org.opennms.netmgt.config.datacollection.IpList
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema


Copyright © 2008. All Rights Reserved.