ComparableBloomElementsExtension<E extends Comparable> extension
Reactive Comparable collection reductions and sorting extensions on BloomIterableElements.
Architectural Benefits
Extends BloomIterableElements with reactive sorting and extremum discovery. All list-returning methods yield frozen immutable lists via List.unmodifiable to safeguard state across reactive boundaries.
Data Propagation Flow
[Source Bloom<Iterable<Comparable>>]
│ (Push-Dirty)
▼
[Comparable Reduction / Sorting Pipeline]
├─► .min / .minOrNull ──► Reductive scalar Bloom<E?>
├─► .max / .maxOrNull ──► Reductive scalar Bloom<E?>
└─► .sorted / .sortedDescending ──► Immutable sorted Bloom<List<E>>
Examples
final names = blooming(['Charlie', 'Alice', 'Bob']);
final sortedNames = names.bloom.elements.sorted;
final firstName = names.bloom.elements.minOrNull;
print(untracked(sortedNames)); // ['Alice', 'Bob', 'Charlie']
print(untracked(firstName)); // 'Alice'
- on
Properties
-
max
→ Bloom<
E> -
Available on BloomIterableElements<
Returns the maximum element in this collection, or throws StateError if empty.E> , provided by the ComparableBloomElementsExtension extensionno setter -
maxOrNull
→ Bloom<
E?> -
Available on BloomIterableElements<
Returns the maximum element in this collection, orE> , provided by the ComparableBloomElementsExtension extensionnullif empty.no setter -
min
→ Bloom<
E> -
Available on BloomIterableElements<
Returns the minimum element in this collection, or throws StateError if empty.E> , provided by the ComparableBloomElementsExtension extensionno setter -
minOrNull
→ Bloom<
E?> -
Available on BloomIterableElements<
Returns the minimum element in this collection, orE> , provided by the ComparableBloomElementsExtension extensionnullif empty.no setter -
sorted
→ Bloom<
List< E> > -
Available on BloomIterableElements<
Returns a new unmodifiable list containing elements sorted in ascending order reactively.E> , provided by the ComparableBloomElementsExtension extensionno setter -
sortedDescending
→ Bloom<
List< E> > -
Available on BloomIterableElements<
Returns a new unmodifiable list containing elements sorted in descending order reactively.E> , provided by the ComparableBloomElementsExtension extensionno setter
Methods
-
isSorted(
[int compare(E a, E b)?]) → Bloom< bool> -
Available on BloomIterableElements<
ReturnsE> , provided by the ComparableBloomElementsExtension extensiontrueif this collection is sorted in ascending order reactively.