@Test public void testGetMostRecent() { DataStorage.add(BinLabel.BIN_RECENT, fv); FeatureVector recentFV = DataStorage.getMostRecent(); for (int i = 0; i < recentFV.size(); i++) assertEquals("DataStorage.getMostRecent failed", recentFV.get(i), fv.get(i), 0.0); assertEquals("DataStorage.getMostRecent failed", recentFV.getIntClassLabel(), fv.getIntClassLabel()); DataStorage.clear(BinLabel.BIN_RECENT); }
public static synchronized FeatureVector getMostRecent() { if (data.get(BinLabel.BIN_RECENT) == null) return null; if (data.get(BinLabel.BIN_RECENT).size() == 0) return null; return data.get(BinLabel.BIN_RECENT).remove(0); }
DataStorage { public static synchronized FeatureVector getMostRecent() { if (data.get(BinLabel.BIN_RECENT) == null) return null; if (data.get(BinLabel.BIN_RECENT).size() == 0) return null; return data.get(BinLabel.BIN_RECENT).remove(0); } }
DataStorage { public static synchronized FeatureVector getMostRecent() { if (data.get(BinLabel.BIN_RECENT) == null) return null; if (data.get(BinLabel.BIN_RECENT).size() == 0) return null; return data.get(BinLabel.BIN_RECENT).remove(0); }  }
DataStorage { public static synchronized FeatureVector getMostRecent() { if (data.get(BinLabel.BIN_RECENT) == null) return null; if (data.get(BinLabel.BIN_RECENT).size() == 0) return null; return data.get(BinLabel.BIN_RECENT).remove(0); }  static synchronized FeatureVector get(BinLabel binLabel, int index); static List<FeatureVector> getAll(BinLabel binLabel); static synchronized void add(BinLabel binLabel, FeatureVector fv); static synchronized void clear(BinLabel binLabel); static int binSize(BinLabel binLabel); static synchronized void add(FeatureVector fv); static synchronized FeatureVector getMostRecent(); static synchronized void setDefaultBin(BinLabel binLabel); static void setMaxRecent(int maxRecents); }
DataStorage { public static synchronized FeatureVector getMostRecent() { if (data.get(BinLabel.BIN_RECENT) == null) return null; if (data.get(BinLabel.BIN_RECENT).size() == 0) return null; return data.get(BinLabel.BIN_RECENT).remove(0); }  static synchronized FeatureVector get(BinLabel binLabel, int index); static List<FeatureVector> getAll(BinLabel binLabel); static synchronized void add(BinLabel binLabel, FeatureVector fv); static synchronized void clear(BinLabel binLabel); static int binSize(BinLabel binLabel); static synchronized void add(FeatureVector fv); static synchronized FeatureVector getMostRecent(); static synchronized void setDefaultBin(BinLabel binLabel); static void setMaxRecent(int maxRecents);  }