uk.ac.essex.xul.castor
Class Inputs

java.lang.Object
  extended by uk.ac.essex.xul.castor.Inputs
All Implemented Interfaces:
java.io.Serializable

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

Class Inputs.

See Also:
Serialized Form

Constructor Summary
Inputs()
           
 
Method Summary
 void addInput(Input vInput)
           
 void addInput(int index, Input vInput)
           
 java.util.Enumeration<? extends Input> enumerateInput()
          Method enumerateInput.
 Input[] getInput()
          Method getInput.Returns the contents of the collection in an Array.
 Input getInput(int index)
          Method getInput.
 int getInputCount()
          Method getInputCount.
 boolean isValid()
          Method isValid.
 java.util.Iterator<? extends Input> iterateInput()
          Method iterateInput.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllInput()
           
 boolean removeInput(Input vInput)
          Method removeInput.
 Input removeInputAt(int index)
          Method removeInputAt.
 void setInput(Input[] vInputArray)
           
 void setInput(int index, Input vInput)
           
static Inputs 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

Inputs

public Inputs()
Method Detail

addInput

public void addInput(Input vInput)
              throws java.lang.IndexOutOfBoundsException
Parameters:
vInput -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addInput

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

enumerateInput

public java.util.Enumeration<? extends Input> enumerateInput()
Method enumerateInput.

Returns:
an Enumeration over all possible elements of this collection

getInput

public Input getInput(int index)
               throws java.lang.IndexOutOfBoundsException
Method getInput.

Parameters:
index -
Returns:
the value of the uk.ac.essex.xul.castor.Input at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getInput

public Input[] getInput()
Method getInput.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

getInputCount

public int getInputCount()
Method getInputCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateInput

public java.util.Iterator<? extends Input> iterateInput()
Method iterateInput.

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

removeAllInput

public void removeAllInput()

removeInput

public boolean removeInput(Input vInput)
Method removeInput.

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

removeInputAt

public Input removeInputAt(int index)
Method removeInputAt.

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

setInput

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

setInput

public void setInput(Input[] vInputArray)
Parameters:
vInputArray -

unmarshal

public static Inputs 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.xul.castor.Inputs
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