stockportfolio
Class StockQueue
java.lang.Object
stockportfolio.ObjectDQueue
stockportfolio.StockQueue
- All Implemented Interfaces:
- IDQueue, IQueue
- public class StockQueue
- extends ObjectDQueue
A queue holding blocks of stock owned.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
StockQueue
public StockQueue()
addToFront
public boolean addToFront(java.lang.Object newValue)
- Description copied from interface:
IDQueue
- Add (push) an element to the front of the queue; thus, the next dequeue
operation would return this value, assuming there were no other
intervening addToFront operations.
- Specified by:
addToFront
in interface IDQueue
- Overrides:
addToFront
in class ObjectDQueue
addToFront
public boolean addToFront(IStockBlock newValue)
enqueue
public boolean enqueue(java.lang.Object newValue)
- Description copied from interface:
IQueue
- Push a new object on the queue.
- Specified by:
enqueue
in interface IQueue
- Overrides:
enqueue
in class ObjectDQueue
enqueue
public boolean enqueue(IStockBlock newValue)
frontStockBlock
public IStockBlock frontStockBlock()
getStockBlock
public IStockBlock getStockBlock(int i)
dequeueStockBlock
public IStockBlock dequeueStockBlock()
getTotalShares
public double getTotalShares()
toString
public java.lang.String toString()