collection library Data Structures
Extensions on iterables, lists, maps, and strings, along with new collection types: bi-map, bit-list, B+tree map/set, disjoint-set, Fenwick tree, multi-map, multi-set, ordered/sorted list, range, R-tree, trie, and type-map.
Classes
- BigIntRange
- A range of BigInt containing an arithmetic progression.
-
BiMap<
K, V> - A bi-map associates keys with values and values with keys.
- BitList
- A space efficient List that stores boolean values.
- Bounds
- Axis-aligned bounding box for N-dimensional spatial indexing.
-
BTreeMap<
K, V> - An ordered, in-memory map backed by an order-statistic B+Tree.
-
BTreeSet<
E> - An ordered, in-memory set backed by an order-statistic B+Tree.
-
Collection<
E> - A mutable collection interface exposing the common operations of List and Set.
-
DisjointSet<
T> - A Disjoint-set data structure, also known as a union-find data structure or merge-find set.
- DoubleRange
- A range of doubles containing an arithmetic progression.
- FenwickTree
- A Fenwick tree (or binary indexed tree) is a data structure that can efficiently update and calculate prefix sums in an array of values.
- IntegerRange
- A range of integers containing an arithmetic progression.
-
ListMultimap<
K, V> - A multimap that stores values in a List, and that maintains the insertion order of values of a given key. A factory can be provided to create custom value collections.
-
MapWithComputed<
K, V> - A MapView that dynamically computes and caches absent keys.
-
MapWithDefault<
K, V> - A MapView that returns a default value for non-existent keys.
-
Multimap<
K, V, VS extends Iterable< V> > - A collection maintaining a mapping between keys and multiple values.
-
Multiset<
E> - A generalized Set (or Bag) in which members are allowed to appear more than once.
-
OrderedList<
E> - A list with amortized constant-time addition and removal at both ends, backed by a circular buffer.
-
Range<
E> - Abstract superclass of an arithmetic progression.
-
RangeIterator<
T> - An Iterator over a Range.
-
RTree<
T> - Abstract base implementation of the R-Tree data structure, a spatial index for n-dimensional geometric bounding boxes and points.
-
RTreeEntry<
T> - R-Tree entry, containing either a pointer to a child RTreeNode instance (if this is not a leaf entry), or data (if this is a leaf entry).
-
RTreeNode<
T> - An R-Tree node, which is a container for R-Tree entries. The node is a leaf node if its entries contain data; otherwise, if it is a non-leaf node, then its entries contain pointers to children nodes.
-
SetMultimap<
K, V> - A multimap that stores values in a Set, and that keeps the unique values of a given key. A factory can be provided to create custom value collections.
-
SortedList<
E> - A sorted list that remains sorted by a Comparator as elements get added.
-
Trie<
K, P extends Comparable< Object?> , V> -
A generalized Trie (or prefix tree) where keys of type
Kare split into ordered parts of typeP, storing values of typeV. -
TrieNode<
K, P extends Comparable< Object?> , V> - Abstract implementation of the nodes in a Trie.
-
TrieNodeEntry<
K, P extends Comparable< Object?> , V> - Abstract TrieNode with a possible key and value.
-
TrieNodeList<
K, P extends Comparable< Object?> , V> - TrieNode that holds children in a sorted List.
-
TrieNodeMap<
K, P extends Comparable< Object?> , V> - TrieNode that holds children in a Map.
-
TypeMap<
T> - A type map associates reified Dart Type arguments with instances of that type.
Enums
- NormalizationForm
- The different Unicode Normalization Forms.
Extensions
- BigIntRangeExtension on BigInt
- Extension on BigInt providing range creation methods.
-
BiMapOnIterableExtension
on Iterable<
E> - Extension on Iterable to convert to a BiMap.
-
BiMapOnMapExtension
on Map<
K, V> - Extension on Map to convert to a BiMap.
-
BitListExtension
on Iterable<
bool> - Extension on Iterable of booleans to convert to a BitList.
-
BTreeMapExtension
on Map<
K, V> - Conversion extension on Map to create a BTreeMap.
-
BTreeSetExtension
on Iterable<
E> - Conversion extension on Iterable to create a BTreeSet.
- ChunkedCharactersExtension on Characters
-
Extension on
Charactersto divide characters into chunks. -
ChunkedIterableExtension
on Iterable<
E> - Extension on Iterable to chunk elements into fixed-size lists.
- ChunkedStringExtension on String
- Extension on String to divide strings into chunks.
-
CombinationsIterableExtension
on Iterable<
E> - Extension on Iterable to generate combinations.
-
ComputedMapExtension
on Map<
K, V> - Extension on Map to provide computed default values.
- ConvertFirstLastStringExtension on String
- Extension on String to convert first and last characters.
-
CountIterableExtension
on Iterable<
E> - Extension on Iterable to count matching elements.
- DeepFlattenIterableExtension on Iterable
- Extension on Iterable to recursively flatten nested iterables.
-
DefaultMapExtension
on Map<
K, V> - Extension on Map to provide a fallback default value.
- DoubleRangeExtension on double
- Extension on double providing range creation methods.
-
FlatMapIterableExtension
on Iterable<
E> - Extension on Iterable providing flatMap mapping.
-
FlattenIterableExtension
on Iterable<
Iterable< E> > - Extension on Iterable of iterables to flatten elements.
-
GroupIterableExtension
on Iterable<
V> - Extension on Iterable to group consecutive elements.
-
GroupMapEntryExtension
on Group<
K, V> - Extension to access the index on the Group values.
- IndentDedentStringExtension on String
- Extension on String to indent and dedent multiline text.
-
IndexedIterableExtension
on Iterable<
E> - Extension on Iterable to provide indexed elements.
-
IndexedMapEntryExtension
on Indexed<
E> - Extension to access the index on a Indexed value.
-
IndicesIterableExtension
on Iterable<
Object?> - Extension on Iterable providing index range methods.
- IntegerRangeExtension on int
- Extension on int providing range creation methods.
-
ListBoundsExtension
on List<
double> - Extension on List<double> of coordinates to convert to a zero-volume point Bounds.
-
ListMultimapOnIterableExtension
on Iterable<
E> - Extension on Iterable to convert to a ListMultimap.
-
ListMultimapOnMapExtension
on Map<
K, V> - Extension on Map to convert to a ListMultimap.
-
MultisetExtension
on Iterable<
T> - Extension on Iterable to convert to a Multiset.
- NormalizeStringExtension on String
- Extension on String to normalize Unicode strings.
-
OperatorsIterableExtension
on Iterable<
E> - Extension on Iterable providing statistical and search operators.
-
OrderedListIterableExtension
on Iterable<
E> - Extension on Iterable to convert to an OrderedList.
-
PairwiseIterableExtension
on Iterable<
E> - Extension on Iterable to emit consecutive overlapping pairs.
-
PartitionIterableExtension
on Iterable<
E> - Extension on Iterable to partition elements based on a predicate.
- PartitionStringExtension on String
- Extension on String to partition strings around separators.
-
PermutationComparableListExtension
on List<
E> - Extension on List to permute elements in-place.
-
PermutationIterableExtension
on Iterable<
E> - Extension on Iterable to generate permutations.
-
PointBoundsExtension
on Point<
double> - Extension on math.Point<double> to convert to Bounds.
-
PowerSetIterableExtension
on Iterable<
E> - Extension on Iterable to compute its power set.
- PrefixSuffixStringExtension on String
- Extension on String to remove prefixes and suffixes.
-
Product2IterableExtension
on (Iterable<
T1> , Iterable<T2> ) - Extension on records of iterables to compute their Cartesian product.
-
ProductIterableExtension
on Iterable<
Iterable< E> > - Extension on Iterable of iterables to compute the Cartesian product.
-
RandomIterableExtension
on Iterable<
E> - Extension on Iterable to select a random element.
-
RectangleBoundsExtension
on Rectangle<
double> - Extension on math.Rectangle<double> to convert to Bounds.
-
RepeatIterableExtension
on Iterable<
E> - Extension on Iterable to repeat its elements.
-
RotateListExtension
on List<
E> - Extension on List to rotate elements in-place.
-
RotateQueueExtension
on Queue<
E> - Extension on Queue to rotate elements in-place.
-
SeparatedIterableExtension
on Iterable<
E> - Extension on Iterable to separate elements with injected items.
-
SetMultimapOnIterableExtension
on Iterable<
E> - Extension on Iterable to convert to a SetMultimap.
-
SetMultimapOnMapExtension
on Map<
K, V> - Extension on Map to convert to a SetMultimap.
-
SortedListIterableExtension
on Iterable<
E> - Extension on Iterable to convert to a SortedList.
- StringListExtension on String
- Extension on String providing list view over characters.
-
TakeSkipListExtension
on List<
E> - Extension on List to take or skip elements and sub-ranges.
- TakeSkipStringExtension on String
- Extension on String to take or skip characters and patterns.
-
ToMapIterableExtension
on Iterable<
E> - Extension on Iterable to convert to a Map.
-
UniqueIterableExtension
on Iterable<
E> - Extension on Iterable to filter out duplicate elements.
-
WindowIterableExtension
on Iterable<
E> - Extension on Iterable to provide sliding windows of elements.
- WrapUnwrapStringExtension on String
- Extension on String providing text wrapping and unwrapping.
-
Zip2IterableExtension
on (Iterable<
T1> , Iterable<T2> ) - Extension on records of iterables to zip elements into record tuples.
-
ZipIterableExtension
on Iterable<
Iterable< E> > - Extension on Iterable of iterables to zip elements together.
Functions
-
iterate<
E> (E value, E callback(E element)) → Iterable< E> -
Returns a lazy infinite list of repeated applications of
callbackto the initialvalue. -
repeat<
E> (E element, {int? count}) → Iterable< E> -
Returns an infinite iterable with a constant
element. Ifcountis provided the resulting iterator is limited tocountelements.
Typedefs
-
DisjointSetNode<
T> = ({T parent, int size}) - Internal node entry stored in DisjointSet's backing map.
-
Group<
K, V> = MapEntry< K, List< V> > - A group of values.
-
Indexed<
E> = MapEntry< int, E> - An indexed value.
-
TrieGetParts<
K, P> = Iterable< P> Function(K key) -
Function to extract the parts of type
Pfrom a key of typeK.