|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.farrago.test.FarragoObjectCacheTest.RentalCar
private class FarragoObjectCacheTest.RentalCar
RentalCar exemplifies a reusable object.
Field Summary | |
---|---|
private String |
description
|
private boolean |
isDriving
|
private int |
mileage
|
Constructor Summary | |
---|---|
FarragoObjectCacheTest.RentalCar(String description)
Creates a new car, with an initial mileage of 0 coming out of the factory. |
Method Summary | |
---|---|
void |
assureQuality()
Tests this car's quality after fabrication, throwing a FarragoObjectCacheTest.LemonException if unacceptable. |
void |
closeAllocation()
Closes this object. |
void |
drive(int miles)
Drives this car, increasing the mileage. |
String |
getDescription()
|
int |
getMileage()
|
boolean |
hasEscapePod()
|
boolean |
isOld()
|
boolean |
isSmokingVehicle()
|
boolean |
isTooOld()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private String description
private int mileage
private boolean isDriving
Constructor Detail |
---|
FarragoObjectCacheTest.RentalCar(String description)
description
- bland description of this car, e.g. "SUV 12-Door"Method Detail |
---|
public String getDescription()
public void drive(int miles)
miles
- number of miles to drivepublic int getMileage()
public boolean isOld()
public boolean isSmokingVehicle()
public boolean hasEscapePod()
public void assureQuality()
FarragoObjectCacheTest.LemonException
if unacceptable.
public boolean isTooOld()
public void closeAllocation()
ClosableAllocation
closeAllocation
in interface ClosableAllocation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |