|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjamel.markets.AbstractOffer
public abstract class AbstractOffer
A base class for offers on markets.
Encapsulates a volume offered and a unit price.
Last update: 8-Dec-2010.
| Field Summary | |
|---|---|
private Offerer |
author
The agent author of the offer. |
private double |
price
The unit price. |
private int |
volume
The offered volume. |
| Constructor Summary | |
|---|---|
protected |
AbstractOffer(Offerer offerer,
int volume,
double price)
Creates a new offer. |
| Method Summary | |
|---|---|
void |
clear()
|
protected Offerer |
getOfferer()
Returns the agent author of the offer. |
protected double |
getPrice()
Returns the unit price. |
int |
getVolume()
Returns the offered volume. |
void |
subtract(double volume)
Subtract a volume to the offered volume. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
private Offerer author
private final double price
private int volume
| Constructor Detail |
|---|
protected AbstractOffer(Offerer offerer,
int volume,
double price)
offerer - the agent author of the offer.volume - the offered volume.price - the unit price of the offer.| Method Detail |
|---|
public void clear()
protected Offerer getOfferer()
protected double getPrice()
public int getVolume()
public void subtract(double volume)
volume - the volume to subtract.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||