static { Map<String, String> fakeData = new HashMap<>(); fakeData.put("http://www.weather.gov", "Weather forecast"); fakeData.put("http://www.espn.com", "Sports scores"); fakeData.put("http://www.marketwatch.com", "Stock market data"); fakeData.put("http://www.fandango.com", "Movie showtimes"); data = Collections.unmodifiableMap(fakeData); }
/** * Returns an unmodifiable map of all metrics and their names. * * @return an unmodifiable map of all metrics and their names */ public Map<MetricName, Metric> getAllMetrics() { return Collections.unmodifiableMap(metrics); }