org.mars_sim.msp.config.model.mineral
Class MineralConcentrations

java.lang.Object
  extended by org.mars_sim.msp.config.model.mineral.MineralConcentrations
All Implemented Interfaces:
Serializable

public class MineralConcentrations
extends Object
implements Serializable

Class MineralConcentrations.

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

Constructor Summary
MineralConcentrations()
           
 
Method Summary
 void addMineral(int index, Mineral vMineral)
           
 void addMineral(Mineral vMineral)
           
 Enumeration<? extends Mineral> enumerateMineral()
          Method enumerateMineral.
 Mineral[] getMineral()
          Method getMineral.Returns the contents of the collection in an Array.
 Mineral getMineral(int index)
          Method getMineral.
 int getMineralCount()
          Method getMineralCount.
 boolean isValid()
          Method isValid.
 Iterator<? extends Mineral> iterateMineral()
          Method iterateMineral.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllMineral()
           
 boolean removeMineral(Mineral vMineral)
          Method removeMineral.
 Mineral removeMineralAt(int index)
          Method removeMineralAt.
 void setMineral(int index, Mineral vMineral)
           
 void setMineral(Mineral[] vMineralArray)
           
static MineralConcentrations 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

MineralConcentrations

public MineralConcentrations()
Method Detail

addMineral

public void addMineral(Mineral vMineral)
                throws IndexOutOfBoundsException
Parameters:
vMineral -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addMineral

public void addMineral(int index,
                       Mineral vMineral)
                throws IndexOutOfBoundsException
Parameters:
index -
vMineral -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateMineral

public Enumeration<? extends Mineral> enumerateMineral()
Method enumerateMineral.

Returns:
an Enumeration over all possible elements of this collection

getMineral

public Mineral getMineral(int index)
                   throws IndexOutOfBoundsException
Method getMineral.

Parameters:
index -
Returns:
the value of the org.mars_sim.msp.config.model.mineral.Mineral at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getMineral

public Mineral[] getMineral()
Method getMineral.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

getMineralCount

public int getMineralCount()
Method getMineralCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateMineral

public Iterator<? extends Mineral> iterateMineral()
Method iterateMineral.

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

removeAllMineral

public void removeAllMineral()

removeMineral

public boolean removeMineral(Mineral vMineral)
Method removeMineral.

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

removeMineralAt

public Mineral removeMineralAt(int index)
Method removeMineralAt.

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

setMineral

public void setMineral(int index,
                       Mineral vMineral)
                throws IndexOutOfBoundsException
Parameters:
index -
vMineral -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setMineral

public void setMineral(Mineral[] vMineralArray)
Parameters:
vMineralArray -

unmarshal

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

Parameters:
reader -
Returns:
the unmarshaled org.mars_sim.msp.config.model.mineral.MineralConcentrations
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 © 2009-2013. All Rights Reserved.