Hacker News new | ask | show | jobs
by Zardoz84 50 days ago
> Day 1: Comparing/ checking equality against multiple Strings.

Just use Apache Commons Lang Strings.CS.equalsAny . If not, List.of or Set.of (if N could be big) should be the best options. Streams are better when you chain many operations.