collection library Collection

Non-aggregating utilities for working with collections.

This includes:

See sugar.collection.aggregate for aggregation related utilities.

Classes

ListMove<E>
A namespace for functions that move a List's elements to other collections.
SetMove<E>
A namespace for functions that move a Set's elements to other collections.

Extensions

IterableIterable on Iterable<Iterable<E>>
Provides functions for working with nested iterables.
Iterables on Iterable<E>
Provides functions for transforming Iterables to other collections.
Lists on List<E>
Provides functions for working with Lists.
Maps on Map<K, V>
Provides functions for working with Maps.
MovableList on List<E>
Provides functions for moving elements in lists to other collections.
MovableSet on Set<E>
Provides functions for moving elements in sets to other collections.
NonNullableList on List<E>
Provides functions for working with Lists of null-nullable elements.
NonNullableMap on Map<K, V>
Provides functions for working with Maps with null-nullable entries.
NonNullableSet on Set<E>
Provides functions for working with Sets of null-nullable elements.
Sets on Set<E>
Provides functions for working with Sets.

Functions

disjoint(Iterable<Object?> a, Iterable<Object?> b) bool
Returns true if a and b have no common elements.
reverse(List<Object?> list, [int start = 0, int? end]) → void
Reverses a list, or part of between start, inclusive and end, exclusive, in-place.
separate<E>(List<E> list, {required List<E> by}) List<E>
Returns a copy of the list with its elements separated by those in by.