|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjamel.markets.AbstractOffer
jamel.markets.GoodsOffer
public class GoodsOffer
Represents an offer on a goods market.
Last update: 8-Dec-2010.
| Constructor Summary | |
|---|---|
GoodsOffer(Provider provider,
int volume,
double price)
Creates a new offer. |
|
| Method Summary | |
|---|---|
int |
compareTo(AbstractOffer otherOffer)
Implements the Comparable interface so that offers can easily be sorted. |
double |
getPrice()
Returns the unit price. |
Provider |
getProvider()
Returns the author of the offer. |
java.lang.String |
toString()
Returns a string representation of the offer. |
| Methods inherited from class jamel.markets.AbstractOffer |
|---|
clear, getOfferer, getVolume, subtract |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GoodsOffer(Provider provider,
int volume,
double price)
provider - the author of the offer.volume - the offered volume.price - the unit price of the offer.| Method Detail |
|---|
public int compareTo(AbstractOffer otherOffer)
otherOffer - the offer to compare against.
1 if the price of the other offer is less than this,
0 if both have the same price
and -1 this price is less than the others.public double getPrice()
getPrice in class AbstractOfferpublic Provider getProvider()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||