@Override public Iterator<TickClient> getTickSet(final Tickable T, final int tickID) { final LinkedList<TickClient> subSet = new LinkedList<TickClient>(); if (tickID < 0) subSet.addAll( tickers.subSet( new StdTickClient(T, 0, 0), true, new StdTickClient(T, 0, Integer.MAX_VALUE), true)); else subSet.addAll( tickers.subSet( new StdTickClient(T, 0, tickID), true, new StdTickClient(T, 0, tickID), true)); return subSet.iterator(); }
@Override public boolean contains(final Tickable T, final int tickID) { if (tickID >= 0) return tickers.contains(new StdTickClient(T, 0, tickID)); return tickers .subSet( new StdTickClient(T, 0, -1), true, new StdTickClient(T, 0, Integer.MAX_VALUE), true) .size() > 0; }