/** * This method will take a MutableSet and wrap it directly in a SynchronizedMutableSet. It will * take any other non-Eclipse-Collections collection and first adapt it will a SetAdapter, and then return a * SynchronizedMutableSet that wraps the adapter. */ public static <E, S extends Set<E>> SynchronizedMutableSet<E> of(S set) { return new SynchronizedMutableSet<>(SetAdapter.adapt(set)); }
/** * This method will take a MutableSet and wrap it directly in a SynchronizedMutableSet. It will * take any other non-Eclipse-Collections collection and first adapt it will a SetAdapter, and then return a * SynchronizedMutableSet that wraps the adapter. Additionally, a developer specifies which lock to use * with the collection. */ public static <E, S extends Set<E>> SynchronizedMutableSet<E> of(S set, Object lock) { return new SynchronizedMutableSet<>(SetAdapter.adapt(set), lock); }
/** * This method will take a MutableSet and wrap it directly in a SynchronizedMutableSet. It will * take any other non-Eclipse-Collections collection and first adapt it will a SetAdapter, and then return a * SynchronizedMutableSet that wraps the adapter. */ public static <E, S extends Set<E>> SynchronizedMutableSet<E> of(S set) { return new SynchronizedMutableSet<>(SetAdapter.adapt(set)); }
/** * This method will take a MutableSet and wrap it directly in a SynchronizedMutableSet. It will * take any other non-Eclipse-Collections collection and first adapt it will a SetAdapter, and then return a * SynchronizedMutableSet that wraps the adapter. Additionally, a developer specifies which lock to use * with the collection. */ public static <E, S extends Set<E>> SynchronizedMutableSet<E> of(S set, Object lock) { return new SynchronizedMutableSet<>(SetAdapter.adapt(set), lock); }
/** * This method will take a MutableSet and wrap it directly in a SynchronizedMutableSet. It will * take any other non-GS-collection and first adapt it will a SetAdapter, and then return a * SynchronizedMutableSet that wraps the adapter. */ public static <E, S extends Set<E>> SynchronizedMutableSet<E> of(S set) { return new SynchronizedMutableSet<>(SetAdapter.adapt(set)); }
/** * This method will take a MutableSet and wrap it directly in a SynchronizedMutableSet. It will * take any other non-GS-collection and first adapt it will a SetAdapter, and then return a * SynchronizedMutableSet that wraps the adapter. Additionally, a developer specifies which lock to use * with the collection. */ public static <E, S extends Set<E>> SynchronizedMutableSet<E> of(S set, Object lock) { return new SynchronizedMutableSet<>(SetAdapter.adapt(set), lock); }