Venice 0.7beta
Class OrderCache

  extended by

public class OrderCache
extends java.lang.Object

Caches the order of stock quotes in a quote bundle. The GP allows the user to order the evaluation of stock quotes, by several criteria such as unordered, alphabetically by symbol, volume decreasing etc. This gives priority to certain stocks. For example the user might prefer the GP to concentrate on high volume stocks, so ordering the stocks by volume will give high volume stocks a priority. Since sorting is a slow operation, and the GP traverses over the same day many times, it makes sense to cache the order. Profiling results showed this provides a significant speed increase.

Andrew Leppard
See Also:
OrderComparator, QuoteRangePage

Constructor Summary
OrderCache(EODQuoteBundle quoteBundle, OrderComparator orderComparator)
          Create a new order cache.
Method Summary
 java.util.List getTodaySymbols(int dateOffset)
          Return a list of the given date's ordered symbols.
 boolean isOrdered()
          Return whether the input order comparator is actually ordered.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public OrderCache(EODQuoteBundle quoteBundle,
                  OrderComparator orderComparator)
Create a new order cache.

quoteBundle - the quotes to order
orderComparator - the method of ordering
Method Detail


public java.util.List getTodaySymbols(int dateOffset)
Return a list of the given date's ordered symbols.

dateOffset - fast access date offset
ordered list of symbols


public boolean isOrdered()
Return whether the input order comparator is actually ordered.

true if the order comparator is ordered

Venice 0.7beta