net.vee.btech.component
Class AbstractComponent

java.lang.Object
  |
  +--net.vee.btech.component.AbstractComponent
All Implemented Interfaces:
Component
Direct Known Subclasses:
AbstractWeapon, Cockpit, Engine, Gyro, HeatSink, JumpJet

public abstract class AbstractComponent
extends java.lang.Object
implements Component

A base class for component implementations.


Fields inherited from interface net.vee.btech.component.Component
AMMUNITION_BAY, COCKPIT, ENGINE, GYRO, HEAT_SINK, JUMP_JET, LIFE_SUPPORT, SENSORS, WEAPON
 
Constructor Summary
AbstractComponent(java.lang.String aType, int aMass, int aSize)
          Constructs a new AbstractComponent.
 
Method Summary
 int getHeat()
           
 int getMass()
           
 int getSize()
           
 java.lang.String getType()
           
 boolean isDamaged()
           
 boolean isDestroyed()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.vee.btech.component.Component
getComponentType
 

Constructor Detail

AbstractComponent

public AbstractComponent(java.lang.String aType,
                         int aMass,
                         int aSize)
Constructs a new AbstractComponent.
Parameters:
aType - a label for this Component.
aMass - the mass (in kilograms) of this component.
aSize - the component's size (in critical hit locations).
Method Detail

getType

public java.lang.String getType()
Specified by:
getType in interface Component

isDamaged

public boolean isDamaged()
Specified by:
isDamaged in interface Component

isDestroyed

public boolean isDestroyed()
Specified by:
isDestroyed in interface Component

getSize

public int getSize()
Specified by:
getSize in interface Component

getMass

public int getMass()
Specified by:
getMass in interface Component

getHeat

public int getHeat()
Specified by:
getHeat in interface Component