rterp / SumZeroTrading

A Java API for Developing Automated Trading Applications for the Equity, Futures, and Currency Markets
http://rterp.github.io/SumZeroTrading/
Other
145 stars 47 forks source link

Store QuoteEngine listeners in a Set instead of a List #20

Open 486dx33 opened 8 years ago

486dx33 commented 8 years ago

com.sumzerotrading.marketdata.QuoteEngine stores listeners in Lists. When subscribing to Level1 and Level2 quotes and reusing the same listener, it could be added more than once to the List, and would receive the same quote multiple times.

Using a Set would solve this problem.