sclass BackgroundPlus implements RenderableWithHints { RGB background; new L things; *() {} *(RGB *background, A... things) { this.things = asList(things); } *(RGB *background, L *things) {} public void renderOn(Graphics2D g, int w, int h) { fillRect(g, 0, 0, w, h, toColor(background)); for (A a : things) a/Renderable.renderOn(g, w, h); } public void renderHints(Graphics2D g, int w, int h) { renderOn(g, w, h); for (A a : things) if (a instanceof RenderableWithHints) a/RenderableWithHints.renderHints(g, w, h); } }