|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.upb.swtpra05.group03.plugin.DataHolder
This class contains all data the plugin will ever need, its designed as a singleton.
| Field Summary | |
private java.util.LinkedList |
accountExpensesLinkedList
A LinkedList containing all expense account informations received from shuttle |
private java.util.LinkedList |
accountIncomeLinkedList
A LinkedList containing all income account informations received from shuttle |
private EfficientBitSet |
bS
No comment provided by developer, please add a comment to improve documentation. |
private static DataHolder |
dh
The global DataHolder object |
private java.util.Vector |
extendedOrderVector
A container for all orders we have. |
private java.util.Vector |
routingVector
A container for Names of the Stations on the route |
private ShuttleStatus |
shuttleStatus
A container class for data concerning the shuttle |
| Constructor Summary | |
private |
DataHolder()
Constructor for class DataHolder |
| Method Summary | |
private void |
addAccountComponent(java.util.LinkedList l,
AccountData aD)
Adds a AccountData object to the LinkedList if its not already inserted. |
void |
addAccountData(AccountData aD)
Adds a AccountData object to the DataHolder. |
private void |
addOrder(ExtendedOrder newEO)
This method will add a single ExtendedOrder, if it isn't already known. |
void |
addOrder(java.util.LinkedList newList)
This will add a list of ExtendedOrder objects and delete those we have and that aren't in the new list, in terms of mathematics we delete all elements, that are not in the new list and update those which are in both lists. |
void |
clear()
This method will clear all data in the DataHolder. |
void |
clearAccountData(int smallerThanID)
Tests if elements of both LinkedLists, which governs account data, are smaller than the parameter and if yes, removes them |
java.util.LinkedList |
getAccountExpensesLinkedList()
Gets the LinkedList of the expense AccountData |
java.util.LinkedList |
getAccountIncomeLinkedList()
Gets the LinkedList of the income AccountData |
static DataHolder |
getDH()
Get a reference to the global DataHolder object |
java.util.Vector |
getExtendedOrderVector()
Get all ExtendedOrders as a Vector |
int |
getNrOfExpenses()
Gets the number of expenses account entries |
int |
getNrOfIncome()
Gets the number of income account entries |
int |
getNrOfStations()
Get the number of stations on the route |
ShuttleStatus |
getShuttleStatus()
Get the ShuttleStatus |
java.lang.String |
getStationName(int index)
Get the name of the Station at position index |
void |
setRoute(RoutingData route)
Sets the route of the shuttle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static DataHolder dh
private java.util.Vector routingVector
private java.util.Vector extendedOrderVector
private ShuttleStatus shuttleStatus
private java.util.LinkedList accountIncomeLinkedList
private java.util.LinkedList accountExpensesLinkedList
private EfficientBitSet bS
| Constructor Detail |
private DataHolder()
| Method Detail |
public static DataHolder getDH()
private void addOrder(ExtendedOrder newEO)
newEO - The ExtendedOrder to be updated or added to the ExtendedOrderVectorpublic void addOrder(java.util.LinkedList newList)
newList - The objects added.public java.util.Vector getExtendedOrderVector()
public void setRoute(RoutingData route)
route - The new routepublic ShuttleStatus getShuttleStatus()
public int getNrOfStations()
public java.lang.String getStationName(int index)
index - the position of the station
public int getNrOfIncome()
public int getNrOfExpenses()
public void addAccountData(AccountData aD)
aD - The AccountData to be addedpublic void clearAccountData(int smallerThanID)
smallerThanID - smallest ID which should be listed after the clean up
private void addAccountComponent(java.util.LinkedList l,
AccountData aD)
l - The LinkedList to which the AccountData is to be addedaD - The AccountData to add to the LinkedListpublic java.util.LinkedList getAccountIncomeLinkedList()
public java.util.LinkedList getAccountExpensesLinkedList()
public void clear()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||