KtSet<T> class

A generic unordered collection of elements that does not support duplicate elements. Methods in this interface support only read-only access to the set; read/write access is supported through the KtMutableSet interface. @param E the type of elements contained in the set. The set is covariant on its element type.

Implemented types
Implementers
Available Extensions

Constructors

KtSet.empty()
Returns an empty read-only set.
const
factory
KtSet.from([@nonNull Iterable<T> elements = const []])
Returns a new read-only set based on elements.
factory
KtSet.of([T arg0, T arg1, T arg2, T arg3, T arg4, T arg5, T arg6, T arg7, T arg8, T arg9])
Returns a new read-only set of given elements. [...]
factory

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
iter Iterable<T>
Access to a Iterable to be used in for-loops
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
set Set<T>
Deprecated, use asSet or iter for loops
@Deprecated("use asSet() or iter instead"), read-only
size int
Returns the size of the collection.
read-only, override

Methods

asSet() Set<T>
returns a read-only dart:core Set [...]
contains(T element) bool
Checks if the specified element is contained in this collection.
override
containsAll(KtCollection<T> elements) bool
Checks if all elements in the specified collection are contained in this collection.
override
isEmpty() bool
Returns true if the collection is empty (contains no elements), false otherwise.
override
iterator() KtIterator<T>
Returns an iterator over the elements of this object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited