dart:collection library
Classes and utilities that supplement the collection support in dart:core.
To use this library in your code:
import 'dart:collection';Map
A finite mapping from unique keys to their associated values.Allows efficient lookup of the value associated with a key, if any,and iterating through the individual keys and values of the map.TheMap interface has a number of implementations, including the following:
- HashMap is unordered, the order of iteration is not guaranteed.
- LinkedHashMap iterates in key insertion order.
- SplayTreeMap iterates the keys in sorted order.
- UnmodifiableMapView is a wrapper, an unmodifiableMap view of another
Map.
Set
A collection of objects in which each object can occur only once.TheSet interface has a number of implementations, including the following:
- HashSet does not guarantee the order of the objects in the iterations.
- LinkedHashSet iterates the objects in insertion order.
- SplayTreeSet iterates the objects in sorted order.
- UnmodifiableSetView is a wrapper, an unmodifiableSet view of another
Set.
Queue
A queue is a sequence of elements that is intended to be modified,by adding or removing elements, only at its ends.Dart queues aredouble ended queues, which means that they can beaccessed equally from either end, and can therefore be usedto implement both stack and queue behavior.
- Queue is the general interface for queues.
- ListQueue is a list-based queue. Default implementation forQueue.
- DoubleLinkedQueue is a queue implementation based on a double-linkedlist.
List
An indexable sequence of objects. Objects can be accessed using theirposition, index, in the sequence.List is also called an "array" in otherprogramming languages.
- UnmodifiableListView is a wrapper, an unmodifiableList view ofanother
List.
LinkedList
LinkedList is a specialized double-linked list of elements that extendsLinkedListEntry. Each element knows its own place in the linked list,as well as which list it is in.
Classes
- DoubleLinkedQueue<
E> - AQueue implementation based on a double-linked list.
- DoubleLinkedQueueEntry<
E> - An entry in a doubly linked list.
- HashMap<
K,V> - A hash-table based implementation ofMap.
- HashSet<
E> - An unordered hash-table basedSet implementation.
- HasNextIterator<
E> - Wrapper forIterator providing the pre-Dart 1.0 iterator interface.
- LinkedHashMap<
K,V> - An insertion-orderedMap with expected constant-time lookup.
- LinkedHashSet<
E> - ALinkedHashSet is a hash-table basedSet implementation.
- LinkedList<
E extendsLinkedListEntry< E> > - A specialized double-linked list of elements that extendsLinkedListEntry.
- LinkedListEntry<
E extendsLinkedListEntry< E> > - An object that can be an element in aLinkedList.
- ListBase<
E> - Abstract implementation of a list.
- ListQueue<
E> - List basedQueue.
- MapBase<
K,V> - Base class for implementing aMap.
- MapView<
K,V> - Wrapper around a class that implementsMap that only exposes
Mapmembers. - Queue<
E> - AQueue is a collection that can be manipulated at both ends. Onecan iterate over the elements of a queue throughforEach or withanIterator.
- SetBase<
E> - Base implementation ofSet.
- SplayTreeMap<
K,V> - AMap of objects that can be ordered relative to each other.
- SplayTreeSet<
E> - ASet of objects that can be ordered relative to each other.
- UnmodifiableListView<
E> - An unmodifiableList view of another List.
- UnmodifiableMapBase<
K,V> - Basic implementation of an unmodifiableMap.
- UnmodifiableMapView<
K,V> - View of aMap that disallow modifying the map.
- UnmodifiableSetView<
E> - An unmodifiableSet view of anotherSet.
Extensions
- IterableExtensions onIterable<
T> - Operations on iterables.
- NullableIterableExtensions onIterable<
T?> - Operations on iterables with nullable elements.
Typedefs
- IterableBase<
E> =Iterable< E> - Base class for implementingIterable.
- IterableMixin<
E> =Iterable< E> - ThisIterable mixin implements allIterable members except
iterator. - ListMixin<
E> =ListBase< E> - Base mixin implementation of aList class.
- MapMixin<
K,V> =MapBase< K,V> - Mixin implementing aMap.
- SetMixin<
E> =SetBase< E> - Mixin implementation ofSet.