edu.umich.eecs.tac.props
Class BankStatus

java.lang.Object
  extended by edu.umich.eecs.tac.props.AbstractTransportable
      extended by edu.umich.eecs.tac.props.BankStatus
All Implemented Interfaces:
java.io.Serializable, se.sics.isl.transport.Transportable

public class BankStatus
extends AbstractTransportable

The bank status class holds an agent's account balance at a bank.

See Also:
Serialized Form

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

BankStatus

public BankStatus()
Create a new bank status object with a balance of zero.


BankStatus

public BankStatus(double b)
Create a new bank status object with the supplied balance.

Parameters:
b - the balance
Method Detail

getAccountBalance

public final double getAccountBalance()
Returns the account balance.

Returns:
the account balance.

setAccountBalance

public final void setAccountBalance(double b)
Sets the account balance.

Parameters:
b - the account balance.

toString

public final java.lang.String toString()
Creates a string with the account balance.

Overrides:
toString in class java.lang.Object
Returns:
a string with the account balance.

readWithLock

protected final void readWithLock(se.sics.isl.transport.TransportReader reader)
                           throws java.text.ParseException
Read the balance parameter.

Specified by:
readWithLock in class AbstractTransportable
Parameters:
reader - the reader to read from
Throws:
java.text.ParseException - if a parse exception occurs reading the balance.

writeWithLock

protected final void writeWithLock(se.sics.isl.transport.TransportWriter writer)
Write the balance parameter.

Specified by:
writeWithLock in class AbstractTransportable
Parameters:
writer - the writer to write to.


Copyright © 2007-2009 Association for Trading Agent Research. All Rights Reserved.