org.mars_sim.msp.config.model.settlement
Class Template

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

public class Template
extends Object
implements Serializable

Class Template.

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

Constructor Summary
Template()
           
 
Method Summary
 void addBuilding(Building vBuilding)
           
 void addBuilding(int index, Building vBuilding)
           
 void addEquipment(Equipment vEquipment)
           
 void addEquipment(int index, Equipment vEquipment)
           
 void addPart(int index, Part vPart)
           
 void addPart(Part vPart)
           
 void addPartPackage(int index, PartPackage vPartPackage)
           
 void addPartPackage(PartPackage vPartPackage)
           
 void addResource(int index, Resource vResource)
           
 void addResource(Resource vResource)
           
 void addVehicle(int index, Vehicle vVehicle)
           
 void addVehicle(Vehicle vVehicle)
           
 Enumeration<? extends Building> enumerateBuilding()
          Method enumerateBuilding.
 Enumeration<? extends Equipment> enumerateEquipment()
          Method enumerateEquipment.
 Enumeration<? extends Part> enumeratePart()
          Method enumeratePart.
 Enumeration<? extends PartPackage> enumeratePartPackage()
          Method enumeratePartPackage.
 Enumeration<? extends Resource> enumerateResource()
          Method enumerateResource.
 Enumeration<? extends Vehicle> enumerateVehicle()
          Method enumerateVehicle.
 Building[] getBuilding()
          Method getBuilding.Returns the contents of the collection in an Array.
 Building getBuilding(int index)
          Method getBuilding.
 int getBuildingCount()
          Method getBuildingCount.
 Equipment[] getEquipment()
          Method getEquipment.Returns the contents of the collection in an Array.
 Equipment getEquipment(int index)
          Method getEquipment.
 int getEquipmentCount()
          Method getEquipmentCount.
 String getName()
          Returns the value of field 'name'.
 Part[] getPart()
          Method getPart.Returns the contents of the collection in an Array.
 Part getPart(int index)
          Method getPart.
 int getPartCount()
          Method getPartCount.
 PartPackage[] getPartPackage()
          Method getPartPackage.Returns the contents of the collection in an Array.
 PartPackage getPartPackage(int index)
          Method getPartPackage.
 int getPartPackageCount()
          Method getPartPackageCount.
 Resource[] getResource()
          Method getResource.Returns the contents of the collection in an Array.
 Resource getResource(int index)
          Method getResource.
 int getResourceCount()
          Method getResourceCount.
 Resupply getResupply()
          Returns the value of field 'resupply'.
 Vehicle[] getVehicle()
          Method getVehicle.Returns the contents of the collection in an Array.
 Vehicle getVehicle(int index)
          Method getVehicle.
 int getVehicleCount()
          Method getVehicleCount.
 boolean isValid()
          Method isValid.
 Iterator<? extends Building> iterateBuilding()
          Method iterateBuilding.
 Iterator<? extends Equipment> iterateEquipment()
          Method iterateEquipment.
 Iterator<? extends Part> iteratePart()
          Method iteratePart.
 Iterator<? extends PartPackage> iteratePartPackage()
          Method iteratePartPackage.
 Iterator<? extends Resource> iterateResource()
          Method iterateResource.
 Iterator<? extends Vehicle> iterateVehicle()
          Method iterateVehicle.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllBuilding()
           
 void removeAllEquipment()
           
 void removeAllPart()
           
 void removeAllPartPackage()
           
 void removeAllResource()
           
 void removeAllVehicle()
           
 boolean removeBuilding(Building vBuilding)
          Method removeBuilding.
 Building removeBuildingAt(int index)
          Method removeBuildingAt.
 boolean removeEquipment(Equipment vEquipment)
          Method removeEquipment.
 Equipment removeEquipmentAt(int index)
          Method removeEquipmentAt.
 boolean removePart(Part vPart)
          Method removePart.
 Part removePartAt(int index)
          Method removePartAt.
 boolean removePartPackage(PartPackage vPartPackage)
          Method removePartPackage.
 PartPackage removePartPackageAt(int index)
          Method removePartPackageAt.
 boolean removeResource(Resource vResource)
          Method removeResource.
 Resource removeResourceAt(int index)
          Method removeResourceAt.
 boolean removeVehicle(Vehicle vVehicle)
          Method removeVehicle.
 Vehicle removeVehicleAt(int index)
          Method removeVehicleAt.
 void setBuilding(Building[] vBuildingArray)
           
 void setBuilding(int index, Building vBuilding)
           
 void setEquipment(Equipment[] vEquipmentArray)
           
 void setEquipment(int index, Equipment vEquipment)
           
 void setName(String name)
          Sets the value of field 'name'.
 void setPart(int index, Part vPart)
           
 void setPart(Part[] vPartArray)
           
 void setPartPackage(int index, PartPackage vPartPackage)
           
 void setPartPackage(PartPackage[] vPartPackageArray)
           
 void setResource(int index, Resource vResource)
           
 void setResource(Resource[] vResourceArray)
           
 void setResupply(Resupply resupply)
          Sets the value of field 'resupply'.
 void setVehicle(int index, Vehicle vVehicle)
           
 void setVehicle(Vehicle[] vVehicleArray)
           
static Template 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

Template

public Template()
Method Detail

addBuilding

public void addBuilding(Building vBuilding)
                 throws IndexOutOfBoundsException
Parameters:
vBuilding -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addBuilding

public void addBuilding(int index,
                        Building vBuilding)
                 throws IndexOutOfBoundsException
Parameters:
index -
vBuilding -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addEquipment

public void addEquipment(Equipment vEquipment)
                  throws IndexOutOfBoundsException
Parameters:
vEquipment -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addEquipment

public void addEquipment(int index,
                         Equipment vEquipment)
                  throws IndexOutOfBoundsException
Parameters:
index -
vEquipment -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addPart

public void addPart(Part vPart)
             throws IndexOutOfBoundsException
Parameters:
vPart -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addPart

public void addPart(int index,
                    Part vPart)
             throws IndexOutOfBoundsException
Parameters:
index -
vPart -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addPartPackage

public void addPartPackage(PartPackage vPartPackage)
                    throws IndexOutOfBoundsException
Parameters:
vPartPackage -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addPartPackage

public void addPartPackage(int index,
                           PartPackage vPartPackage)
                    throws IndexOutOfBoundsException
Parameters:
index -
vPartPackage -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addResource

public void addResource(Resource vResource)
                 throws IndexOutOfBoundsException
Parameters:
vResource -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addResource

public void addResource(int index,
                        Resource vResource)
                 throws IndexOutOfBoundsException
Parameters:
index -
vResource -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addVehicle

public void addVehicle(Vehicle vVehicle)
                throws IndexOutOfBoundsException
Parameters:
vVehicle -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addVehicle

public void addVehicle(int index,
                       Vehicle vVehicle)
                throws IndexOutOfBoundsException
Parameters:
index -
vVehicle -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateBuilding

public Enumeration<? extends Building> enumerateBuilding()
Method enumerateBuilding.

Returns:
an Enumeration over all possible elements of this collection

enumerateEquipment

public Enumeration<? extends Equipment> enumerateEquipment()
Method enumerateEquipment.

Returns:
an Enumeration over all possible elements of this collection

enumeratePart

public Enumeration<? extends Part> enumeratePart()
Method enumeratePart.

Returns:
an Enumeration over all possible elements of this collection

enumeratePartPackage

public Enumeration<? extends PartPackage> enumeratePartPackage()
Method enumeratePartPackage.

Returns:
an Enumeration over all possible elements of this collection

enumerateResource

public Enumeration<? extends Resource> enumerateResource()
Method enumerateResource.

Returns:
an Enumeration over all possible elements of this collection

enumerateVehicle

public Enumeration<? extends Vehicle> enumerateVehicle()
Method enumerateVehicle.

Returns:
an Enumeration over all possible elements of this collection

getBuilding

public Building getBuilding(int index)
                     throws IndexOutOfBoundsException
Method getBuilding.

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

getBuilding

public Building[] getBuilding()
Method getBuilding.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

getBuildingCount

public int getBuildingCount()
Method getBuildingCount.

Returns:
the size of this collection

getEquipment

public Equipment getEquipment(int index)
                       throws IndexOutOfBoundsException
Method getEquipment.

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

getEquipment

public Equipment[] getEquipment()
Method getEquipment.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

getEquipmentCount

public int getEquipmentCount()
Method getEquipmentCount.

Returns:
the size of this collection

getName

public String getName()
Returns the value of field 'name'.

Returns:
the value of field 'Name'.

getPart

public Part getPart(int index)
             throws IndexOutOfBoundsException
Method getPart.

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

getPart

public Part[] getPart()
Method getPart.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

getPartCount

public int getPartCount()
Method getPartCount.

Returns:
the size of this collection

getPartPackage

public PartPackage getPartPackage(int index)
                           throws IndexOutOfBoundsException
Method getPartPackage.

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

getPartPackage

public PartPackage[] getPartPackage()
Method getPartPackage.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

getPartPackageCount

public int getPartPackageCount()
Method getPartPackageCount.

Returns:
the size of this collection

getResource

public Resource getResource(int index)
                     throws IndexOutOfBoundsException
Method getResource.

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

getResource

public Resource[] getResource()
Method getResource.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

getResourceCount

public int getResourceCount()
Method getResourceCount.

Returns:
the size of this collection

getResupply

public Resupply getResupply()
Returns the value of field 'resupply'.

Returns:
the value of field 'Resupply'.

getVehicle

public Vehicle getVehicle(int index)
                   throws IndexOutOfBoundsException
Method getVehicle.

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

getVehicle

public Vehicle[] getVehicle()
Method getVehicle.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

getVehicleCount

public int getVehicleCount()
Method getVehicleCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateBuilding

public Iterator<? extends Building> iterateBuilding()
Method iterateBuilding.

Returns:
an Iterator over all possible elements in this collection

iterateEquipment

public Iterator<? extends Equipment> iterateEquipment()
Method iterateEquipment.

Returns:
an Iterator over all possible elements in this collection

iteratePart

public Iterator<? extends Part> iteratePart()
Method iteratePart.

Returns:
an Iterator over all possible elements in this collection

iteratePartPackage

public Iterator<? extends PartPackage> iteratePartPackage()
Method iteratePartPackage.

Returns:
an Iterator over all possible elements in this collection

iterateResource

public Iterator<? extends Resource> iterateResource()
Method iterateResource.

Returns:
an Iterator over all possible elements in this collection

iterateVehicle

public Iterator<? extends Vehicle> iterateVehicle()
Method iterateVehicle.

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

removeAllBuilding

public void removeAllBuilding()

removeAllEquipment

public void removeAllEquipment()

removeAllPart

public void removeAllPart()

removeAllPartPackage

public void removeAllPartPackage()

removeAllResource

public void removeAllResource()

removeAllVehicle

public void removeAllVehicle()

removeBuilding

public boolean removeBuilding(Building vBuilding)
Method removeBuilding.

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

removeBuildingAt

public Building removeBuildingAt(int index)
Method removeBuildingAt.

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

removeEquipment

public boolean removeEquipment(Equipment vEquipment)
Method removeEquipment.

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

removeEquipmentAt

public Equipment removeEquipmentAt(int index)
Method removeEquipmentAt.

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

removePart

public boolean removePart(Part vPart)
Method removePart.

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

removePartAt

public Part removePartAt(int index)
Method removePartAt.

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

removePartPackage

public boolean removePartPackage(PartPackage vPartPackage)
Method removePartPackage.

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

removePartPackageAt

public PartPackage removePartPackageAt(int index)
Method removePartPackageAt.

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

removeResource

public boolean removeResource(Resource vResource)
Method removeResource.

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

removeResourceAt

public Resource removeResourceAt(int index)
Method removeResourceAt.

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

removeVehicle

public boolean removeVehicle(Vehicle vVehicle)
Method removeVehicle.

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

removeVehicleAt

public Vehicle removeVehicleAt(int index)
Method removeVehicleAt.

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

setBuilding

public void setBuilding(int index,
                        Building vBuilding)
                 throws IndexOutOfBoundsException
Parameters:
index -
vBuilding -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setBuilding

public void setBuilding(Building[] vBuildingArray)
Parameters:
vBuildingArray -

setEquipment

public void setEquipment(int index,
                         Equipment vEquipment)
                  throws IndexOutOfBoundsException
Parameters:
index -
vEquipment -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setEquipment

public void setEquipment(Equipment[] vEquipmentArray)
Parameters:
vEquipmentArray -

setName

public void setName(String name)
Sets the value of field 'name'.

Parameters:
name - the value of field 'name'.

setPart

public void setPart(int index,
                    Part vPart)
             throws IndexOutOfBoundsException
Parameters:
index -
vPart -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setPart

public void setPart(Part[] vPartArray)
Parameters:
vPartArray -

setPartPackage

public void setPartPackage(int index,
                           PartPackage vPartPackage)
                    throws IndexOutOfBoundsException
Parameters:
index -
vPartPackage -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setPartPackage

public void setPartPackage(PartPackage[] vPartPackageArray)
Parameters:
vPartPackageArray -

setResource

public void setResource(int index,
                        Resource vResource)
                 throws IndexOutOfBoundsException
Parameters:
index -
vResource -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setResource

public void setResource(Resource[] vResourceArray)
Parameters:
vResourceArray -

setResupply

public void setResupply(Resupply resupply)
Sets the value of field 'resupply'.

Parameters:
resupply - the value of field 'resupply'.

setVehicle

public void setVehicle(int index,
                       Vehicle vVehicle)
                throws IndexOutOfBoundsException
Parameters:
index -
vVehicle -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setVehicle

public void setVehicle(Vehicle[] vVehicleArray)
Parameters:
vVehicleArray -

unmarshal

public static Template 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.settlement.Template
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.