@Test public void testCopyConstructor() { RouterLevelHistogram p = RouterLevelHistogram.makeAverageHistogram(histogram); RouterLevelHistogram q = new RouterLevelHistogram(p); assertEquals(p, q); q.remove("00:01:02:03:04:05"); assertEquals(3, p.size()); assertEquals(2, q.size()); }
public static RouterLevelHistogram makeAverageHistogram(final Histogram histogram) { final RouterLevelHistogram rlh = new RouterLevelHistogram(); for (Map.Entry<String, Map<Integer, Float>> accessPoint : histogram.entrySet()) { rlh.put(accessPoint.getKey(), calculateWeightedAverageLevel(accessPoint.getValue())); } return rlh; }
RouterLevelHistogram extends HashMap<String, Float> { public static RouterLevelHistogram makeAverageHistogram(final Histogram histogram) { final RouterLevelHistogram rlh = new RouterLevelHistogram(); for (Map.Entry<String, Map<Integer, Float>> accessPoint : histogram.entrySet()) { rlh.put(accessPoint.getKey(), calculateWeightedAverageLevel(accessPoint.getValue())); } return rlh; } }
RouterLevelHistogram extends HashMap<String, Float> { public static RouterLevelHistogram makeAverageHistogram(final Histogram histogram) { final RouterLevelHistogram rlh = new RouterLevelHistogram(); for (Map.Entry<String, Map<Integer, Float>> accessPoint : histogram.entrySet()) { rlh.put(accessPoint.getKey(), calculateWeightedAverageLevel(accessPoint.getValue())); } return rlh; } RouterLevelHistogram(final RouterLevelHistogram rlh);  RouterLevelHistogram(); }
RouterLevelHistogram extends HashMap<String, Float> { public static RouterLevelHistogram makeAverageHistogram(final Histogram histogram) { final RouterLevelHistogram rlh = new RouterLevelHistogram(); for (Map.Entry<String, Map<Integer, Float>> accessPoint : histogram.entrySet()) { rlh.put(accessPoint.getKey(), calculateWeightedAverageLevel(accessPoint.getValue())); } return rlh; } RouterLevelHistogram(final RouterLevelHistogram rlh);  RouterLevelHistogram(); int intersect(final RouterLevelHistogram rlh); static RouterLevelHistogram makeMedianHistogram(final Histogram histogram); static RouterLevelHistogram makeAverageHistogram(final Histogram histogram); static RouterLevelHistogram makeNormalizedHistogram(final RouterLevelHistogram histogram); }
RouterLevelHistogram extends HashMap<String, Float> { public static RouterLevelHistogram makeAverageHistogram(final Histogram histogram) { final RouterLevelHistogram rlh = new RouterLevelHistogram(); for (Map.Entry<String, Map<Integer, Float>> accessPoint : histogram.entrySet()) { rlh.put(accessPoint.getKey(), calculateWeightedAverageLevel(accessPoint.getValue())); } return rlh; } RouterLevelHistogram(final RouterLevelHistogram rlh);  RouterLevelHistogram(); int intersect(final RouterLevelHistogram rlh); static RouterLevelHistogram makeMedianHistogram(final Histogram histogram); static RouterLevelHistogram makeAverageHistogram(final Histogram histogram); static RouterLevelHistogram makeNormalizedHistogram(final RouterLevelHistogram histogram);  }