|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.umich.eecs.tac.props.AbstractTransportable edu.umich.eecs.tac.props.BankStatus
public class BankStatus
The bank status class holds an agent's account balance at a bank.
Constructor Summary | |
---|---|
BankStatus()
Create a new bank status object with a balance of zero. |
|
BankStatus(double b)
Create a new bank status object with the supplied balance. |
Method Summary | |
---|---|
double |
getAccountBalance()
Returns the account balance. |
protected void |
readWithLock(se.sics.isl.transport.TransportReader reader)
Read the balance parameter. |
void |
setAccountBalance(double b)
Sets the account balance. |
java.lang.String |
toString()
Creates a string with the account balance. |
protected void |
writeWithLock(se.sics.isl.transport.TransportWriter writer)
Write the balance parameter. |
Methods inherited from class edu.umich.eecs.tac.props.AbstractTransportable |
---|
getTransportName, isLocked, lock, lockCheck, read, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BankStatus()
public BankStatus(double b)
b
- the balanceMethod Detail |
---|
public final double getAccountBalance()
public final void setAccountBalance(double b)
b
- the account balance.public final java.lang.String toString()
toString
in class java.lang.Object
protected final void readWithLock(se.sics.isl.transport.TransportReader reader) throws java.text.ParseException
readWithLock
in class AbstractTransportable
reader
- the reader to read from
java.text.ParseException
- if a parse exception occurs reading the balance.protected final void writeWithLock(se.sics.isl.transport.TransportWriter writer)
writeWithLock
in class AbstractTransportable
writer
- the writer to write to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |