| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cuny.cat.market.AuctioneerPolicy
edu.cuny.cat.market.matching.ShoutEngine
public abstract class ShoutEngine
a framework of a shout processing unit for a specialist.
| Field Summary | |
|---|---|
static AscendingShoutComparator | 
AscendingOrder
comparator for ascending shouts  | 
static DescendingShoutComparator | 
DescendingOrder
comparator for descending shouts  | 
| Fields inherited from class edu.cuny.cat.market.AuctioneerPolicy | 
|---|
auctioneer | 
| Constructor Summary | |
|---|---|
ShoutEngine()
 | 
|
| Method Summary | |
|---|---|
abstract  java.util.Iterator<Shout> | 
ascendingAskIterator()
 | 
abstract  java.util.Iterator<Shout> | 
askIterator()
 | 
abstract  java.util.Iterator<Shout> | 
bidIterator()
 | 
abstract  java.util.Iterator<Shout> | 
descendingBidIterator()
 | 
abstract  Shout | 
getHighestMatchedAsk()
Get the highest matched ask.  | 
abstract  Shout | 
getHighestUnmatchedBid()
Get the highest unmatched bid in the auction.  | 
abstract  Shout | 
getLowestMatchedBid()
Get the lowest matched bid in the auction.  | 
abstract  Shout | 
getLowestUnmatchedAsk()
Get the lowest unmatched ask.  | 
abstract  org.apache.commons.collections15.buffer.PriorityBuffer<Shout> | 
getMatchedAsks()
 | 
abstract  org.apache.commons.collections15.buffer.PriorityBuffer<Shout> | 
getMatchedBids()
 | 
 java.util.List<Shout> | 
getMatchedShouts()
Deprecated. replaced by matchShouts(). | 
abstract  int | 
getMatchedVolume()
 | 
abstract  int | 
getNumOfMatchedAsks()
 | 
abstract  int | 
getNumOfMatchedBids()
 | 
abstract  int | 
getNumOfUnmatchedAsks()
 | 
abstract  int | 
getNumOfUnmatchedBids()
 | 
abstract  org.apache.commons.collections15.buffer.PriorityBuffer<Shout> | 
getUnmatchedAsks()
 | 
abstract  org.apache.commons.collections15.buffer.PriorityBuffer<Shout> | 
getUnmatchedBids()
 | 
abstract  int | 
getUnmatchedDemand()
 | 
abstract  int | 
getUnmatchedSupply()
 | 
abstract  java.util.Iterator<Shout> | 
matchedAskIterator()
 | 
abstract  java.util.Iterator<Shout> | 
matchedBidIterator()
 | 
abstract  java.util.List<Shout> | 
matchShouts()
Destructively fetch the list of matched bids and asks.  | 
abstract  void | 
newShout(Shout shout)
 | 
abstract  void | 
printState()
Log the current status of the auction.  | 
abstract  void | 
removeShout(Shout shout)
 | 
| Methods inherited from class edu.cuny.cat.market.AuctioneerPolicy | 
|---|
eventOccurred, getAuctioneer, initialize, reset, setAuctioneer, setup, toString | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static AscendingShoutComparator AscendingOrder
public static DescendingShoutComparator DescendingOrder
| Constructor Detail | 
|---|
public ShoutEngine()
| Method Detail | 
|---|
public abstract void newShout(Shout shout)
                       throws DuplicateShoutException
DuplicateShoutExceptionpublic abstract void removeShout(Shout shout)
public abstract void printState()
@Deprecated public java.util.List<Shout> getMatchedShouts()
matchShouts().
public abstract java.util.List<Shout> matchShouts()
Destructively fetch the list of matched bids and asks. The list is of the form
where bi is the ith bid and a0 is the ith ask. A typical auctioneer would clear by matching bi with ai for all i at some price.
Note that the engine's set of matched shouts will become empty as a result of invoking this method.
public abstract Shout getHighestUnmatchedBid()
public abstract Shout getLowestMatchedBid()
public abstract Shout getLowestUnmatchedAsk()
public abstract Shout getHighestMatchedAsk()
public abstract java.util.Iterator<Shout> askIterator()
public abstract java.util.Iterator<Shout> ascendingAskIterator()
public abstract java.util.Iterator<Shout> matchedAskIterator()
public abstract java.util.Iterator<Shout> bidIterator()
public abstract java.util.Iterator<Shout> descendingBidIterator()
public abstract java.util.Iterator<Shout> matchedBidIterator()
public abstract int getMatchedVolume()
public abstract int getUnmatchedSupply()
public abstract int getUnmatchedDemand()
public abstract int getNumOfUnmatchedBids()
public abstract int getNumOfUnmatchedAsks()
public abstract int getNumOfMatchedBids()
public abstract int getNumOfMatchedAsks()
public abstract org.apache.commons.collections15.buffer.PriorityBuffer<Shout> getMatchedBids()
public abstract org.apache.commons.collections15.buffer.PriorityBuffer<Shout> getUnmatchedBids()
public abstract org.apache.commons.collections15.buffer.PriorityBuffer<Shout> getMatchedAsks()
public abstract org.apache.commons.collections15.buffer.PriorityBuffer<Shout> getUnmatchedAsks()
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||