|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cuny.cat.core.Transaction
public class Transaction
This class records a match between an ask and a bid.
Field Summary | |
---|---|
protected Shout |
ask
The offers that led to this transaction. |
protected Shout |
bid
The offers that led to this transaction. |
protected java.lang.String |
id
The identity allocated to this transaction. |
protected double |
price
The price at which the good was sold for. |
protected Specialist |
specialist
|
Constructor Summary | |
---|---|
Transaction(Shout ask,
Shout bid,
double price)
|
|
Transaction(java.lang.String id,
Shout ask,
Shout bid,
double price)
|
Method Summary | |
---|---|
java.lang.Object |
clone()
|
boolean |
equals(Transaction anotherTrans)
compares whether this transaction equals another one. |
Shout |
getAsk()
|
Shout |
getBid()
|
java.lang.String |
getId()
|
double |
getPrice()
|
int |
getQuantity()
|
Specialist |
getSpecialist()
|
void |
setAsk(Shout ask)
|
void |
setBid(Shout bid)
|
void |
setId(java.lang.String id)
|
void |
setPrice(double price)
|
void |
setSpecialist(Specialist specialist)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String id
protected Specialist specialist
protected Shout ask
protected Shout bid
protected double price
Constructor Detail |
---|
public Transaction(Shout ask, Shout bid, double price)
public Transaction(java.lang.String id, Shout ask, Shout bid, double price)
Method Detail |
---|
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public boolean equals(Transaction anotherTrans)
anotherTrans
- the transaction to compare
public java.lang.String getId()
public Specialist getSpecialist()
public Shout getAsk()
public Shout getBid()
public double getPrice()
public void setAsk(Shout ask)
public void setBid(Shout bid)
public void setId(java.lang.String id)
public void setSpecialist(Specialist specialist)
public void setPrice(double price)
public int getQuantity()
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 |