Graphics2D (@NotNull JComponent c, @NotNull Graphics g) { Graphics2D gg = (Graphics2D)g; for (BiFunction<? super JComponent, ? super Graphics2D, ? extends Graphics2D> transform : ourGlobalTransform) { gg = Objects.requireNonNull(transform.apply(c, gg)); } return gg; }