package xyz.marsavic.gfxlab.elements; import xyz.marsavic.functions.interfaces.F1; public abstract class ElementF1 extends ElementF { protected final F1 f; protected final Input in0; public ElementF1(F1 f, HasOutput p0) { this.f = f; in0 = new Input<>(p0.out()); } public static class Lazy extends ElementF1 { public Lazy(F1 f, HasOutput p0) { super(f, p0); } private R object; @Override protected void buildItUp() { object = null; } public R object() { if (object == null) { object = f.at(in0.get()); } return object; } } }