Hacker News new | ask | show | jobs
by jrockway 5059 days ago
You don't even need to use the Builder directly, just use the structure's "of" method:

   ImmutableSet<Foo> foos = ImmutableSet.of(a, few, elements);
   ImmutableMap<Key, Value> map = ImmutableMap.of(k1, v1, k2, v2);