#java #java8
Iterator<Algorithm> it = algorithms.iterator();for (Algorithm algorithm : (Iterable<Algorithm>) () -> it) {if (algorithm == toFind) break;}return it.hasNext() ? it.next() : null;
Obviously not gonna use this code. There is a better way to do it, anyway.
Obviously not gonna use this code. There is a better way to do it, anyway.