public static @NotNull Element setSize(@NotNull Element element, @NotNull String width, @NotNull String height, @NotNull Dimension size) {
    return element
      .setAttribute(width, Integer.toString(size.width))
      .setAttribute(height, Integer.toString(size.height));
  }
public static @NotNull Element setSize(@NotNull Element element, @NotNull String width, @NotNull String height, @NotNull Dimension size)