org.powertac.common
Class CashPosition

java.lang.Object
  extended by org.powertac.common.CashPosition

public class CashPosition
extends Object

A CashPosition domain instance represents the current state of a broker's cash account. An updated CashPosition is sent to brokers during each timeslot. This is not public information.

Version:
1.1 - 02/27/2011
Author:
Carsten Block, David Dauer

Constructor Summary
CashPosition(Broker broker, double initialBalance)
           
 
Method Summary
 double deposit(double amount)
          Updates the balance in this account by the specified amount, returns the resulting balance.
 double getBalance()
          Returns the balance in the account at the time this CashPosition was generated.
 Broker getBroker()
          Returns the broker whose cash is represented.
 long getId()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CashPosition

public CashPosition(Broker broker,
                    double initialBalance)
Method Detail

getId

public long getId()

getBroker

public Broker getBroker()
Returns the broker whose cash is represented.


getBalance

public double getBalance()
Returns the balance in the account at the time this CashPosition was generated.


toString

public String toString()
Overrides:
toString in class Object

deposit

public double deposit(double amount)
Updates the balance in this account by the specified amount, returns the resulting balance. A withdrawal is negative, deposit is positive.



Copyright © 2011. All Rights Reserved.