@Override
    public synchronized boolean add(final E e) {
        if (e == null) {
            throw new IllegalArgumentException("LeastRecentlyUsedSet cannot take null element");
        }
        return map.put(e, PRESENT) == null;
    }
Synchronized addition of an item
Copy of the HashSet code if add()

@see HashSet
main/src/main/java/cgeo/geocaching/utils/LeastRecentlyUsedSet.java