stockportfolio
Class StockQueue

java.lang.Object
  extended bystockportfolio.ObjectDQueue
      extended bystockportfolio.StockQueue
All Implemented Interfaces:
IDQueue, IQueue

public class StockQueue
extends ObjectDQueue

A queue holding blocks of stock owned.


Constructor Summary
StockQueue()
           
 
Method Summary
 boolean addToFront(IStockBlock newValue)
           
 boolean addToFront(java.lang.Object newValue)
          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.
 IStockBlock dequeueStockBlock()
           
 boolean enqueue(IStockBlock newValue)
           
 boolean enqueue(java.lang.Object newValue)
          Push a new object on the queue.
 IStockBlock frontStockBlock()
           
 IStockBlock getStockBlock(int i)
           
 double getTotalShares()
           
 java.lang.String toString()
           
 
Methods inherited from class stockportfolio.ObjectDQueue
dequeue, front, getObject, isEmpty, isFull, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StockQueue

public StockQueue()
Method Detail

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()