@Test(expected = IllegalArgumentException.class) public void testPutOnFramesWithNullStartFrame() { BoundingBoxMap map = new BoundingBoxMap(); map.putOnFrames(null, 15, new BoundingBox(0, 0, 0, 0, 0, false, 0, 0, 0)); }
public void putOnFrames(Integer firstFrame, Integer lastFrame, BoundingBox boundingBox) { if (firstFrame == null) { throw new IllegalArgumentException("firstFrame must not be null"); } if (lastFrame == null) { throw new IllegalArgumentException("lastFrame must not be null"); } if (lastFrame < firstFrame) { throw new IllegalArgumentException(String.format("lastFrame must not be smaller than firstFrame (%s <= %s)", lastFrame.toString(), firstFrame.toString())); } for (int i = firstFrame; i <= lastFrame; i++) { putOnFrame(i, boundingBox); } }
BoundingBoxMap extends TreeMap<Integer, List<BoundingBox>> { public void putOnFrames(Integer firstFrame, Integer lastFrame, BoundingBox boundingBox) { if (firstFrame == null) { throw new IllegalArgumentException("firstFrame must not be null"); } if (lastFrame == null) { throw new IllegalArgumentException("lastFrame must not be null"); } if (lastFrame < firstFrame) { throw new IllegalArgumentException(String.format("lastFrame must not be smaller than firstFrame (%s <= %s)", lastFrame.toString(), firstFrame.toString())); } for (int i = firstFrame; i <= lastFrame; i++) { putOnFrame(i, boundingBox); } } }
BoundingBoxMap extends TreeMap<Integer, List<BoundingBox>> { public void putOnFrames(Integer firstFrame, Integer lastFrame, BoundingBox boundingBox) { if (firstFrame == null) { throw new IllegalArgumentException("firstFrame must not be null"); } if (lastFrame == null) { throw new IllegalArgumentException("lastFrame must not be null"); } if (lastFrame < firstFrame) { throw new IllegalArgumentException(String.format("lastFrame must not be smaller than firstFrame (%s <= %s)", lastFrame.toString(), firstFrame.toString())); } for (int i = firstFrame; i <= lastFrame; i++) { putOnFrame(i, boundingBox); } }  }
BoundingBoxMap extends TreeMap<Integer, List<BoundingBox>> { public void putOnFrames(Integer firstFrame, Integer lastFrame, BoundingBox boundingBox) { if (firstFrame == null) { throw new IllegalArgumentException("firstFrame must not be null"); } if (lastFrame == null) { throw new IllegalArgumentException("lastFrame must not be null"); } if (lastFrame < firstFrame) { throw new IllegalArgumentException(String.format("lastFrame must not be smaller than firstFrame (%s <= %s)", lastFrame.toString(), firstFrame.toString())); } for (int i = firstFrame; i <= lastFrame; i++) { putOnFrame(i, boundingBox); } }  @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>> { public void putOnFrames(Integer firstFrame, Integer lastFrame, BoundingBox boundingBox) { if (firstFrame == null) { throw new IllegalArgumentException("firstFrame must not be null"); } if (lastFrame == null) { throw new IllegalArgumentException("lastFrame must not be null"); } if (lastFrame < firstFrame) { throw new IllegalArgumentException(String.format("lastFrame must not be smaller than firstFrame (%s <= %s)", lastFrame.toString(), firstFrame.toString())); } for (int i = firstFrame; i <= lastFrame; i++) { putOnFrame(i, boundingBox); } }  @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; }