An interface for collections that contain no duplicates.

Namespace: yWorks.yFiles.Util
Assembly: yWorks.yFilesSilverlight.Algorithms (in yWorks.yFilesSilverlight.Algorithms.dll) Version:


public interface ISet : ICollection, ICollection, ICollection<Object>, IEnumerable<Object>, IEnumerable
Visual Basic
Public Interface ISet _ Inherits ICollection, ICollection, ICollection(Of Object), _ IEnumerable(Of Object), IEnumerable


An interface for collections that contain no duplicates.

For each pair of elements e1 and e2 in a set, e1.equals(e2) is always falseFalsefalsefalse (False in Visual Basic). In addition, the Add(Object) and AddAll(ICollection) methods do not insert objects that are already present in the set (again, according to the equals method of the entries).

This interface does not impose restrictions on the order or the type of the entries. Concrete implementations may thus allow or disallow nullNothingnullptra null reference (Nothing in Visual Basic) entries or impose a specific order of the entries.

Note that the behavior is undefined if you use mutable objects as entries and change them in a way that affects equality comparisons with other entries as long as the object is stored in the set.

See Also