Class ReferenceArraySet<K>

    • Constructor Detail

      • ReferenceArraySet

        public ReferenceArraySet​(Object[] a)
        Creates a new array set using the given backing array. The resulting set will have as many elements as the array.

        It is responsibility of the caller that the elements of a are distinct.

        Parameters:
        a - the backing array.
      • ReferenceArraySet

        public ReferenceArraySet()
        Creates a new empty array set.
      • ReferenceArraySet

        public ReferenceArraySet​(int capacity)
        Creates a new empty array set of given initial capacity.
        Parameters:
        capacity - the initial capacity.
      • ReferenceArraySet

        public ReferenceArraySet​(ReferenceCollection<K> c)
        Creates a new array set copying the contents of a given collection.
        Parameters:
        c - a collection.
      • ReferenceArraySet

        public ReferenceArraySet​(Collection<? extends K> c)
        Creates a new array set copying the contents of a given set.
        Parameters:
        c - a collection.
      • ReferenceArraySet

        public ReferenceArraySet​(ReferenceSet<K> c)
        Creates a new array set copying the contents of a given collection.
        Parameters:
        c - a collection.
      • ReferenceArraySet

        public ReferenceArraySet​(Set<? extends K> c)
        Creates a new array set copying the contents of a given set.
        Parameters:
        c - a collection.
      • ReferenceArraySet

        public ReferenceArraySet​(Object[] a,
                                 int size)
        Creates a new array set using the given backing array and the given number of elements of the array.

        It is responsibility of the caller that the first size elements of a are distinct.

        Parameters:
        a - the backing array.
        size - the number of valid elements in a.