org.mars_sim.msp.config.model.construction
Class Building

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

public class Building
extends Object
implements Serializable

Class Building.

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

Constructor Summary
Building()
           
 
Method Summary
 void addPart(int index, Part vPart)
           
 void addPart(Part vPart)
           
 void addResource(int index, Resource vResource)
           
 void addResource(Resource vResource)
           
 void addVehicle(int index, Vehicle vVehicle)
           
 void addVehicle(Vehicle vVehicle)
           
 void deleteConstructable()
           
 void deleteLength()
           
 void deleteSalvagable()
           
 void deleteSkillRequired()
           
 void deleteWidth()
           
 void deleteWorkTime()
           
 Enumeration<? extends Part> enumeratePart()
          Method enumeratePart.
 Enumeration<? extends Resource> enumerateResource()
          Method enumerateResource.
 Enumeration<? extends Vehicle> enumerateVehicle()
          Method enumerateVehicle.
 boolean getConstructable()
          Returns the value of field 'constructable'.
 String getFrame()
          Returns the value of field 'frame'.
 double getLength()
          Returns the value of field 'length'.
 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.
 Resource[] getResource()
          Method getResource.Returns the contents of the collection in an Array.
 Resource getResource(int index)
          Method getResource.
 int getResourceCount()
          Method getResourceCount.
 boolean getSalvagable()
          Returns the value of field 'salvagable'.
 long getSkillRequired()
          Returns the value of field 'skillRequired'.
 Vehicle[] getVehicle()
          Method getVehicle.Returns the contents of the collection in an Array.
 Vehicle getVehicle(int index)
          Method getVehicle.
 int getVehicleCount()
          Method getVehicleCount.
 double getWidth()
          Returns the value of field 'width'.
 double getWorkTime()
          Returns the value of field 'workTime'.
 boolean hasConstructable()
          Method hasConstructable.
 boolean hasLength()
          Method hasLength.
 boolean hasSalvagable()
          Method hasSalvagable.
 boolean hasSkillRequired()
          Method hasSkillRequired.
 boolean hasWidth()
          Method hasWidth.
 boolean hasWorkTime()
          Method hasWorkTime.
 boolean isConstructable()
          Returns the value of field 'constructable'.
 boolean isSalvagable()
          Returns the value of field 'salvagable'.
 boolean isValid()
          Method isValid.
 Iterator<? extends Part> iteratePart()
          Method iteratePart.
 Iterator<? extends Resource> iterateResource()
          Method iterateResource.
 Iterator<? extends Vehicle> iterateVehicle()
          Method iterateVehicle.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllPart()
           
 void removeAllResource()
           
 void removeAllVehicle()
           
 boolean removePart(Part vPart)
          Method removePart.
 Part removePartAt(int index)
          Method removePartAt.
 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 setConstructable(boolean constructable)
          Sets the value of field 'constructable'.
 void setFrame(String frame)
          Sets the value of field 'frame'.
 void setLength(double length)
          Sets the value of field 'length'.
 void setName(String name)
          Sets the value of field 'name'.
 void setPart(int index, Part vPart)
           
 void setPart(Part[] vPartArray)
           
 void setResource(int index, Resource vResource)
           
 void setResource(Resource[] vResourceArray)
           
 void setSalvagable(boolean salvagable)
          Sets the value of field 'salvagable'.
 void setSkillRequired(long skillRequired)
          Sets the value of field 'skillRequired'.
 void setVehicle(int index, Vehicle vVehicle)
           
 void setVehicle(Vehicle[] vVehicleArray)
           
 void setWidth(double width)
          Sets the value of field 'width'.
 void setWorkTime(double workTime)
          Sets the value of field 'workTime'.
static Building 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

Building

public Building()
Method Detail

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

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

deleteConstructable

public void deleteConstructable()

deleteLength

public void deleteLength()

deleteSalvagable

public void deleteSalvagable()

deleteSkillRequired

public void deleteSkillRequired()

deleteWidth

public void deleteWidth()

deleteWorkTime

public void deleteWorkTime()

enumeratePart

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

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

getConstructable

public boolean getConstructable()
Returns the value of field 'constructable'.

Returns:
the value of field 'Constructable'.

getFrame

public String getFrame()
Returns the value of field 'frame'.

Returns:
the value of field 'Frame'.

getLength

public double getLength()
Returns the value of field 'length'.

Returns:
the value of field 'Length'.

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.construction.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

getResource

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

Parameters:
index -
Returns:
the value of the org.mars_sim.msp.config.model.construction.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

getSalvagable

public boolean getSalvagable()
Returns the value of field 'salvagable'.

Returns:
the value of field 'Salvagable'.

getSkillRequired

public long getSkillRequired()
Returns the value of field 'skillRequired'.

Returns:
the value of field 'SkillRequired'.

getVehicle

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

Parameters:
index -
Returns:
the value of the org.mars_sim.msp.config.model.construction.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

getWidth

public double getWidth()
Returns the value of field 'width'.

Returns:
the value of field 'Width'.

getWorkTime

public double getWorkTime()
Returns the value of field 'workTime'.

Returns:
the value of field 'WorkTime'.

hasConstructable

public boolean hasConstructable()
Method hasConstructable.

Returns:
true if at least one Constructable has been added

hasLength

public boolean hasLength()
Method hasLength.

Returns:
true if at least one Length has been added

hasSalvagable

public boolean hasSalvagable()
Method hasSalvagable.

Returns:
true if at least one Salvagable has been added

hasSkillRequired

public boolean hasSkillRequired()
Method hasSkillRequired.

Returns:
true if at least one SkillRequired has been added

hasWidth

public boolean hasWidth()
Method hasWidth.

Returns:
true if at least one Width has been added

hasWorkTime

public boolean hasWorkTime()
Method hasWorkTime.

Returns:
true if at least one WorkTime has been added

isConstructable

public boolean isConstructable()
Returns the value of field 'constructable'.

Returns:
the value of field 'Constructable'.

isSalvagable

public boolean isSalvagable()
Returns the value of field 'salvagable'.

Returns:
the value of field 'Salvagable'.

isValid

public boolean isValid()
Method isValid.

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

iteratePart

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

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

removeAllPart

public void removeAllPart()

removeAllResource

public void removeAllResource()

removeAllVehicle

public void removeAllVehicle()

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

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

setConstructable

public void setConstructable(boolean constructable)
Sets the value of field 'constructable'.

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

setFrame

public void setFrame(String frame)
Sets the value of field 'frame'.

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

setLength

public void setLength(double length)
Sets the value of field 'length'.

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

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 -

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 -

setSalvagable

public void setSalvagable(boolean salvagable)
Sets the value of field 'salvagable'.

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

setSkillRequired

public void setSkillRequired(long skillRequired)
Sets the value of field 'skillRequired'.

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

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 -

setWidth

public void setWidth(double width)
Sets the value of field 'width'.

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

setWorkTime

public void setWorkTime(double workTime)
Sets the value of field 'workTime'.

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

unmarshal

public static Building 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.construction.Building
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.