Libraryless. Click here for Pure Java version (7901L/45K).
static <A> AutoCloseable tempAdd(Cl<A> l, A a) { if (l == null || l.contains(a)) null; l.add(a); ret new tempAdd_undo(l, a); } srecord noeq tempAdd_undo<A>(Cl<A> l, A a) is AutoCloseable { close { l.remove(a); } } static AutoCloseable tempAdd(Container a, Component b) { if (a == null || b == null) null; swing { if (b.getParent() == a) null; a.add(b); ret -> swing { if (b.getParent() == a) removeFromParent(b); }; } }
Began life as a copy of #1016563
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment