When.java - ported any() functionality