/** * Constructs a new, empty set that orders its elements according to * their {@linkplain Comparable natural ordering}. */ public ConcurrentSkipListSet() { m = new ConcurrentSkipListMap(); }
/** * Constructs a new, empty set that orders its elements according to * the specified comparator. * * @param comparator the comparator that will be used to order this set. * If <tt>null</tt>, the {@linkplain Comparable natural * ordering} of the elements will be used. */ public ConcurrentSkipListSet(Comparator comparator) { m = new ConcurrentSkipListMap(comparator); }
/** * Constructs a new, empty set that orders its elements according to * their {@linkplain Comparable natural ordering}. */ public ConcurrentSkipListSet() { m = new ConcurrentSkipListMap(); }
/** * Constructs a new, empty set that orders its elements according to * the specified comparator. * * @param comparator the comparator that will be used to order this set. * If <tt>null</tt>, the {@linkplain Comparable natural * ordering} of the elements will be used. */ public ConcurrentSkipListSet(Comparator comparator) { m = new ConcurrentSkipListMap(comparator); }
/** * Constructs a new, empty set that orders its elements according to * their {@linkplain Comparable natural ordering}. */ public ConcurrentSkipListSet() { m = new ConcurrentSkipListMap(); }
/** * Constructs a new, empty set that orders its elements according to * the specified comparator. * * @param comparator the comparator that will be used to order this set. * If <tt>null</tt>, the {@linkplain Comparable natural * ordering} of the elements will be used. */ public ConcurrentSkipListSet(Comparator comparator) { m = new ConcurrentSkipListMap(comparator); }
/** * Returns a shallow copy of this <tt>ConcurrentSkipListSet</tt> * instance. (The elements themselves are not cloned.) * * @return a shallow copy of this set */ public Object clone() { if (this.getClass() != ConcurrentSkipListSet.class) { // can't change m, since it is final throw new UnsupportedOperationException("Can't clone subclasses"); } return new ConcurrentSkipListSet(new ConcurrentSkipListMap(this.m)); }
/** * Returns a shallow copy of this <tt>ConcurrentSkipListSet</tt> * instance. (The elements themselves are not cloned.) * * @return a shallow copy of this set */ public Object clone() { if (this.getClass() != ConcurrentSkipListSet.class) { // can't change m, since it is final throw new UnsupportedOperationException("Can't clone subclasses"); } return new ConcurrentSkipListSet(new ConcurrentSkipListMap(this.m)); }
/** * Returns a shallow copy of this <tt>ConcurrentSkipListSet</tt> * instance. (The elements themselves are not cloned.) * * @return a shallow copy of this set */ public Object clone() { if (this.getClass() != ConcurrentSkipListSet.class) { // can't change m, since it is final throw new UnsupportedOperationException("Can't clone subclasses"); } return new ConcurrentSkipListSet(new ConcurrentSkipListMap(this.m)); }
/** * Constructs a new set containing the same elements and using the * same ordering as the specified sorted set. * * @param s sorted set whose elements will comprise the new set * @throws NullPointerException if the specified sorted set or any * of its elements are null */ public ConcurrentSkipListSet(SortedSet s) { m = new ConcurrentSkipListMap(s.comparator()); addAll(s); }
/** * Constructs a new set containing the same elements and using the * same ordering as the specified sorted set. * * @param s sorted set whose elements will comprise the new set * @throws NullPointerException if the specified sorted set or any * of its elements are null */ public ConcurrentSkipListSet(SortedSet s) { m = new ConcurrentSkipListMap(s.comparator()); addAll(s); }
/** * Constructs a new set containing the same elements and using the * same ordering as the specified sorted set. * * @param s sorted set whose elements will comprise the new set * @throws NullPointerException if the specified sorted set or any * of its elements are null */ public ConcurrentSkipListSet(SortedSet s) { m = new ConcurrentSkipListMap(s.comparator()); addAll(s); }
/** * Constructs a new set containing the elements in the specified * collection, that orders its elements according to their * {@linkplain Comparable natural ordering}. * * @param c The elements that will comprise the new set * @throws ClassCastException if the elements in <tt>c</tt> are * not {@link Comparable}, or are not mutually comparable * @throws NullPointerException if the specified collection or any * of its elements are null */ public ConcurrentSkipListSet(Collection c) { m = new ConcurrentSkipListMap(); addAll(c); }
/** * Constructs a new set containing the elements in the specified * collection, that orders its elements according to their * {@linkplain Comparable natural ordering}. * * @param c The elements that will comprise the new set * @throws ClassCastException if the elements in <tt>c</tt> are * not {@link Comparable}, or are not mutually comparable * @throws NullPointerException if the specified collection or any * of its elements are null */ public ConcurrentSkipListSet(Collection c) { m = new ConcurrentSkipListMap(); addAll(c); }
/** * Constructs a new set containing the elements in the specified * collection, that orders its elements according to their * {@linkplain Comparable natural ordering}. * * @param c The elements that will comprise the new set * @throws ClassCastException if the elements in <tt>c</tt> are * not {@link Comparable}, or are not mutually comparable * @throws NullPointerException if the specified collection or any * of its elements are null */ public ConcurrentSkipListSet(Collection c) { m = new ConcurrentSkipListMap(); addAll(c); }