code: private void update(Collision collision,
                          double x,
                          double y,
                          int width,
                          int height,
                          Map<Collision, Rectangle> cacheRectRender)
      {
          if (boxs.containsKey(collision))
          {
              final Rectangle rectangle = boxs.get(collision);
              rectangle.set(x, y, width, height);
              cacheRectRender.get(collision).set(x, y, width, height);
          }
          else
          {
              final Rectangle rectangle = new Rectangle(x, y, width, height);
              cacheColls.add(collision);
              cacheRect.add(rectangle);
              cacheRectRender.put(collision, new Rectangle(x, y, width, height));
              boxs.put(collision, rectangle);
          }
      }
docs: Update the collision box.
  
  @param collision The collision reference.
  @param x The horizontal location.
  @param y The vertical location.
  @param width The collision width.
  @param height The collision height.
  @param cacheRectRender Cache for rendering.