|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.kolls.railworld.car.AbstractCar
net.kolls.railworld.car.Caboose
public class Caboose
Red caboose based on C&P 90751
| Field Summary |
|---|
| Fields inherited from class net.kolls.railworld.car.AbstractCar |
|---|
isLoaded |
| Fields inherited from interface net.kolls.railworld.Car |
|---|
CAR_WIDTH, DIST_BETWEEN_CARS |
| Constructor Summary | |
|---|---|
Caboose()
|
|
| Method Summary | |
|---|---|
java.awt.Color |
color()
Return the Car's color. |
boolean |
isLoadable()
Determine if the current Car can be loaded and unloaded; that is, does it carry cargo. |
Distance |
length()
Returns the length of this Car. |
void |
load()
Loads the current Car. |
boolean |
loaded()
Indicates if the Car is currently loaded. |
java.lang.String |
show()
Gives a human-readable word for the Car. |
void |
unload()
Unloads the current Car. |
int |
weight()
Returns the weight of this Car (taking load/unload into account, if necessary) in US Tons. |
| Methods inherited from class net.kolls.railworld.car.AbstractCar |
|---|
canUserCreate, equals, isEngine, load, midColor, newInstance, save, segs, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Caboose()
| Method Detail |
|---|
public Distance length()
Car
Distance indicating the length of the Car.public boolean loaded()
Car
loaded in interface Carloaded in class AbstractCartrue if the car is loadable and is currently loaded.public int weight()
Car
int representing weight in tons.public java.awt.Color color()
Car
Color of the current Car.public java.lang.String show()
Car
String indicating type of Car.public void load()
Car
load in interface Carload in class AbstractCarpublic void unload()
Car
unload in interface Carunload in class AbstractCarpublic boolean isLoadable()
Car
isLoadable in interface CarisLoadable in class AbstractCartrue if the Car may be loaded and unloaded. Defaults to true.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||