uk.ac.essex.ia.opview.xml
Class Ports

java.lang.Object
  extended by uk.ac.essex.ia.opview.xml.Ports
All Implemented Interfaces:
java.io.Serializable

public class Ports
extends java.lang.Object
implements java.io.Serializable

Class Ports.

See Also:
Serialized Form

Constructor Summary
Ports()
           
 
Method Summary
 void addPort(int index, Port vPort)
           
 void addPort(Port vPort)
           
 java.util.Enumeration<? extends Port> enumeratePort()
          Method enumeratePort.
 Port[] getPort()
          Method getPort.Returns the contents of the collection in an Array.
 Port getPort(int index)
          Method getPort.
 int getPortCount()
          Method getPortCount.
 boolean isValid()
          Method isValid.
 java.util.Iterator<? extends Port> iteratePort()
          Method iteratePort.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllPort()
           
 boolean removePort(Port vPort)
          Method removePort.
 Port removePortAt(int index)
          Method removePortAt.
 void setPort(int index, Port vPort)
           
 void setPort(Port[] vPortArray)
           
static Ports unmarshal(java.io.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

Ports

public Ports()
Method Detail

addPort

public void addPort(Port vPort)
             throws java.lang.IndexOutOfBoundsException
Parameters:
vPort -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addPort

public void addPort(int index,
                    Port vPort)
             throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vPort -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumeratePort

public java.util.Enumeration<? extends Port> enumeratePort()
Method enumeratePort.

Returns:
an Enumeration over all possible elements of this collection

getPort

public Port getPort(int index)
             throws java.lang.IndexOutOfBoundsException
Method getPort.

Parameters:
index -
Returns:
the value of the uk.ac.essex.ia.opview.xml.Port at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getPort

public Port[] getPort()
Method getPort.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

getPortCount

public int getPortCount()
Method getPortCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iteratePort

public java.util.Iterator<? extends Port> iteratePort()
Method iteratePort.

Returns:
an Iterator over all possible elements in this collection

marshal

public void marshal(java.io.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(org.xml.sax.ContentHandler handler)
             throws java.io.IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
handler -
Throws:
java.io.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

removeAllPort

public void removeAllPort()

removePort

public boolean removePort(Port vPort)
Method removePort.

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

removePortAt

public Port removePortAt(int index)
Method removePortAt.

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

setPort

public void setPort(int index,
                    Port vPort)
             throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vPort -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setPort

public void setPort(Port[] vPortArray)
Parameters:
vPortArray -

unmarshal

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

Parameters:
reader -
Returns:
the unmarshaled uk.ac.essex.ia.opview.xml.Ports
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