collection library
A collection of iterable extensions and new collection types: bi-map, bit-list, multi-set, set and list multi-map, range, and string.
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.
-
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 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
factorycan be provided to create custom value collections. -
MapWithComputed<
K, V> -
MapWithDefault<
K, V> -
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 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, based on the Python implementation from https://github.com/lukas-shawford/rtreelib.
-
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
factorycan 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< P> , V> -
A generalized Trie (or prefix tree) where keys of type
Kare split into parts of typeP, storing values of typeV. -
TrieNode<
K, P extends Comparable< P> , V> - Abstract implementation of the nodes in a Trie.
-
TrieNodeEntry<
K, P extends Comparable< P> , V> - Abstract TrieNode with a possible key and value.
-
TrieNodeList<
K, P extends Comparable< P> , V> - TrieNode that holds children in a sorted List.
-
TrieNodeMap<
K, P extends Comparable< P> , V> - TrieNode that holds children in a Map.
-
TypeMap<
T> - A type map associates Dart runtime types 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.
- 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.
-
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.
-
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.
-
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.