static L nonTerminatedThreads(Collection l) { new L out; if (l != null) for (Thread t : l) if (t.getState() != Thread.State.TERMINATED) out.add(t); ret out; }