/** * Defines the concurrent reference set implementation * * @param <T> the type * @return the set */ public static final <T> Set<T> createConcurrentReferenceSet() { return new ConcurrentReferenceHashSet<T>(); } }
/** * Creates a new set with the same contents as the given set. * * @param s the set */ public ConcurrentReferenceHashSet(Set<? extends E> s) { super(new ConcurrentReferenceHashMap<E, Object>()); addAll(s); } }