Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Map[string]interface{} in Go: a user's manual. Parent comment
// Dummy value to associate with an Object in the backing Map private static final Object PRESENT = new Object();
A thread-safe implementation is available with `ConcurrentHashMap.newKeySet()`, which uses a similar approach:
public static <K> KeySetView<K,Boolean> newKeySet() { return new KeySetView<K,Boolean> (new ConcurrentHashMap<K,Boolean>(), Boolean.TRUE); }
There are no comments on this comment yet.
A thread-safe implementation is available with `ConcurrentHashMap.newKeySet()`, which uses a similar approach:
https://github.com/openjdk/jdk/blob/master/src/java.base/sha...