|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.upb.swtpra05.group03.companycontrol.AccountDataControl
The Control Class which maintains the Account Data of the current Company.
| Field Summary | |
private AccountDataField |
actual
Actual Entry |
private int |
actualdatastored
Actual Amount of Data stored. |
private AccountDataField |
first
First Entry |
private int |
firstBalance
The first Balance added |
private AccountDataField |
last
Last Entry |
private int |
lastBalance
The last Balance added |
private int |
lastDate
The Date when the last Balance was added |
private int |
maxdatastored
Amount of the Data that is allowed to be stored max. |
private boolean |
sticky
Lets the Actual Pointer stay where it is or moves to the last Account Information added. |
| Constructor Summary | |
(package private) |
AccountDataControl(int maxstored)
Constructor. |
| Method Summary | |
void |
addAccountBalance(int account,
int time)
Adds a new AccountBalance to the Storage |
int |
getAnzahl()
Returns the actual Amount of Data stored. |
int |
getFirstBalance()
returns first Balance added |
AccountBalances |
getlastAccounts(int howmany)
Returns the last Account Balances stored before the actual Pointer. |
int |
getLastBalance()
returns the last Balance added |
private int[] |
getmaxminoflastAccounts(int howmany)
Calculates the Maximum and the Minimum of the last Balances |
void |
goleft(int amount)
Lets the Actual Pointer move left so Account Balances which are stored early may be displayed |
void |
goright(int amount)
Lets the Actual Pointer move right so Account Balances which are stored later may be displayed |
void |
reset()
Resets all Data |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private int lastBalance
private int lastDate
private int firstBalance
private AccountDataField first
private AccountDataField actual
private AccountDataField last
private boolean sticky
private int maxdatastored
private int actualdatastored
| Constructor Detail |
AccountDataControl(int maxstored)
maxstored - defines how many Balances will be stored| Method Detail |
public int getAnzahl()
public void goleft(int amount)
amount - how far shall the pointer be moved?public void goright(int amount)
amount - how far shall the pointer be moved?
public void addAccountBalance(int account,
int time)
addAccountBalance in interface Accountingaccount - Balance to addtime - the actual timepublic void reset()
reset in interface Accountingpublic int getFirstBalance()
public int getLastBalance()
public AccountBalances getlastAccounts(int howmany)
howmany - defines the Amount of Balances that should be returned.
private int[] getmaxminoflastAccounts(int howmany)
howmany - max/min of howmay Balances from here to the past?
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||