
JEP 531 in #Java27 adds Set.ofLazy(...): define every candidate up front, then resolve membership only when contains(...) first asks for it.
Each candidate is evaluated at most once and the result is reused, even with concurrent access. Preview API, run with --enable-preview.

English










