collection library Collection
Non-aggregating utilities for working with collections.
This includes:
- Bulk operations such as Lists.removeAll.
- Functions for creating a collection from another such as Iterables.toUnmodifiableList.
- Functions for working nullable elements such as NonNullableList.addIfNonNull.
- Move operations that move elements between collections such as MovableList.move.
See sugar.collection.aggregate
for aggregation related utilities.
Classes
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
andb
have no common elements. -
reverse(
List< Object?> list, [int start = 0, int? end]) → void -
Reverses a list, or part of between
start
, inclusive andend
, 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 inby
.