Beispiel #1
0
 public void stream(Consumer<Instant> consumer) {
   String firstSymbol = data.keySet().iterator().next();
   ArrayList<Instant> p = data.get(firstSymbol).points;
   Collections.sort(p);
   for (Instant point : p) {
     // Load the history with data
     for (String symbol : histories.keySet()) {
       TimeSeries ts = data.get(symbol);
       HashMap<String, DataHistory> history = histories.get(symbol);
       for (DataHistory historyQueue : history.values()) {
         historyQueue.add(ts.getDouble(point, "close"));
       }
     }
     consumer.accept(point);
   }
 }