Show / Hide Table of Contents

Class HashSet

IDictionary-based ICollection implementation that contains no duplicate elements.

Inheritance
object
DictionarySet
HashSet
SortedHashSet
Implements
ICollection
IEnumerable
ISerializable
Inherited Members
DictionarySet.Add(object)
DictionarySet.Contains(object)
DictionarySet.Remove(object)
DictionarySet.Clear()
DictionarySet.GetEnumerator()
DictionarySet.CopyTo(Array, int)
DictionarySet.Count
DictionarySet.IsSynchronized
DictionarySet.SyncRoot
DictionarySet.GetObjectData(SerializationInfo, StreamingContext)
DictionarySet.Equals(object)
DictionarySet.Equals(DictionarySet)
DictionarySet.GetHashCode()
DictionarySet.ToString()
DictionarySet.InstantiateDictionary()
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Tangosol.Util.Collections
Assembly: Coherence.dll
Syntax
public class HashSet : DictionarySet, ICollection, IEnumerable, ISerializable

Constructors

HashSet()

Create a new HashSet.

Declaration
public HashSet()

HashSet(ICollection)

Create and populate a new HashSet with the given collection of elements.

Declaration
public HashSet(ICollection items)
Parameters
Type Name Description
ICollection items

The collection of elements to populate the set with.

HashSet(IDictionary)

Create a new HashSet that uses the specified IDictionary to store its elements.

Declaration
protected HashSet(IDictionary dict)
Parameters
Type Name Description
IDictionary dict

The storage dictionary.

HashSet(int)

Create a new HashSet with the specified initial capacity.

Declaration
public HashSet(int capacity)
Parameters
Type Name Description
int capacity

The initial capacity of the backing dictionary.

HashSet(SerializationInfo, StreamingContext)

Initializes a new instance of the HashSet class using the specified SerializationInfo and StreamingContext.

Declaration
protected HashSet(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
SerializationInfo info

A SerializationInfo object containing the information required to initialize this HashSet instance.

StreamingContext context

A StreamingContext object containing the source and destination of the serialized stream associated with this dictionary.

Implements

ICollection
IEnumerable
ISerializable
In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.