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

Iterables on Iterable<E>
Provides functions for filtering and transforming Iterables into 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 a list's elements to other collections.
MovableSet on Set<E>
Provides functions for moving a set's elements 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 of 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.
SplayTreeMaps on SplayTreeMap<K, V>
Provides functions for working SplayTreeMaps.

Functions

disjoint(Iterable<Object?> a, Iterable<Object?> b) bool
Returns true if a and b have no common elements.
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.