@Test public void testPutAll() { Map<Integer, List<BoundingBox>> sourceMap = new HashMap<Integer, List<BoundingBox>>(); int keysAdded = 0; for(int i = 1; i <= 10; i += 2) { sourceMap.put(i, new ArrayList<>()); BoundingBox boundingBox = new BoundingBox(i, i, i, i, i, false, i, i, i); sourceMap.get(i).add(boundingBox); keysAdded++; } BoundingBoxMap map = new BoundingBoxMap(); map.putAll(sourceMap); Assert.assertEquals("sourceMap and map must have the same size", sourceMap.size(), map.size()); for(Map.Entry<Integer, List<BoundingBox>> entry : sourceMap.entrySet()) { Assert.assertTrue(String.format("map must contain key %d", entry.getKey()), map.containsKey(entry.getKey())); for(BoundingBox box : entry.getValue()) { Assert.assertTrue(String.format("map.get(%d) must contain element %s", entry.getKey(), box), map.get(entry.getKey()).contains(box)); } } }
@Override public void putAll(Map<? extends Integer, ? extends List<BoundingBox>> m) { for (java.util.Map.Entry<? extends Integer, ? extends List<BoundingBox>> entry : m.entrySet()) { put(entry.getKey(), entry.getValue()); } }
BoundingBoxMap extends TreeMap<Integer, List<BoundingBox>> { @Override public void putAll(Map<? extends Integer, ? extends List<BoundingBox>> m) { for (java.util.Map.Entry<? extends Integer, ? extends List<BoundingBox>> entry : m.entrySet()) { put(entry.getKey(), entry.getValue()); } } }
BoundingBoxMap extends TreeMap<Integer, List<BoundingBox>> { @Override public void putAll(Map<? extends Integer, ? extends List<BoundingBox>> m) { for (java.util.Map.Entry<? extends Integer, ? extends List<BoundingBox>> entry : m.entrySet()) { put(entry.getKey(), entry.getValue()); } }  }
BoundingBoxMap extends TreeMap<Integer, List<BoundingBox>> { @Override public void putAll(Map<? extends Integer, ? extends List<BoundingBox>> m) { for (java.util.Map.Entry<? extends Integer, ? extends List<BoundingBox>> entry : m.entrySet()) { put(entry.getKey(), entry.getValue()); } }  @Override List<BoundingBox> put(Integer key, List<BoundingBox> value); @Override void putAll(Map<? extends Integer, ? extends List<BoundingBox>> m); void putOnFrame(Integer frame, BoundingBox boundingBox); void putOnFrames(Integer firstFrame, Integer lastFrame, BoundingBox boundingBox); void animate(BoundingBox origin, BoundingBox destination, int firstFrame, int interval); @Override String toString(); List<Markup.BoundingBoxMapEntry> toBoundingBoxMapEntryList(); int getEntryCount(); }
BoundingBoxMap extends TreeMap<Integer, List<BoundingBox>> { @Override public void putAll(Map<? extends Integer, ? extends List<BoundingBox>> m) { for (java.util.Map.Entry<? extends Integer, ? extends List<BoundingBox>> entry : m.entrySet()) { put(entry.getKey(), entry.getValue()); } }  @Override List<BoundingBox> put(Integer key, List<BoundingBox> value); @Override void putAll(Map<? extends Integer, ? extends List<BoundingBox>> m); void putOnFrame(Integer frame, BoundingBox boundingBox); void putOnFrames(Integer firstFrame, Integer lastFrame, BoundingBox boundingBox); void animate(BoundingBox origin, BoundingBox destination, int firstFrame, int interval); @Override String toString(); List<Markup.BoundingBoxMapEntry> toBoundingBoxMapEntryList(); int getEntryCount(); static final int ALL_FRAMES; }