uk.ac.essex.xul.castor
Class Kernels

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

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

Class Kernels.

See Also:
Serialized Form

Constructor Summary
Kernels()
           
 
Method Summary
 void addKernel(int index, Kernel vKernel)
           
 void addKernel(Kernel vKernel)
           
 java.util.Enumeration<? extends Kernel> enumerateKernel()
          Method enumerateKernel.
 Kernel[] getKernel()
          Method getKernel.Returns the contents of the collection in an Array.
 Kernel getKernel(int index)
          Method getKernel.
 int getKernelCount()
          Method getKernelCount.
 boolean isValid()
          Method isValid.
 java.util.Iterator<? extends Kernel> iterateKernel()
          Method iterateKernel.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllKernel()
           
 boolean removeKernel(Kernel vKernel)
          Method removeKernel.
 Kernel removeKernelAt(int index)
          Method removeKernelAt.
 void setKernel(int index, Kernel vKernel)
           
 void setKernel(Kernel[] vKernelArray)
           
static Kernels 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

Kernels

public Kernels()
Method Detail

addKernel

public void addKernel(Kernel vKernel)
               throws java.lang.IndexOutOfBoundsException
Parameters:
vKernel -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addKernel

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

enumerateKernel

public java.util.Enumeration<? extends Kernel> enumerateKernel()
Method enumerateKernel.

Returns:
an Enumeration over all possible elements of this collection

getKernel

public Kernel getKernel(int index)
                 throws java.lang.IndexOutOfBoundsException
Method getKernel.

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

getKernel

public Kernel[] getKernel()
Method getKernel.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

getKernelCount

public int getKernelCount()
Method getKernelCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateKernel

public java.util.Iterator<? extends Kernel> iterateKernel()
Method iterateKernel.

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

removeAllKernel

public void removeAllKernel()

removeKernel

public boolean removeKernel(Kernel vKernel)
Method removeKernel.

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

removeKernelAt

public Kernel removeKernelAt(int index)
Method removeKernelAt.

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

setKernel

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

setKernel

public void setKernel(Kernel[] vKernelArray)
Parameters:
vKernelArray -

unmarshal

public static Kernels 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.Kernels
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