utilities library

Classes

BinaryReader
BinaryWriter
DependencyGraphNode<T>
Interface for a node in the dependency graph.
DependencyGraphNodeSorter<T extends DependencyGraphNode<T>>
DependencySorter<T extends Object>
A simple dependency sorter which will solve well formed dependency structures. It'll detect dependency cycles but it will not help find what caused the cycle or provide any attempt at a best guess for order in cyclic scenarios. Use this as a best case first run and fall back to a more complex solver if this one finds a cycle.
Parentable<T>
TarjansDependencyGraphNodeSorter<T extends DependencyGraphNode<T>>
TarjansDependencySorter<T extends Object>
Sorts dependencies for Actors even when cycles are present

Functions

equalValue<T, K>(Iterable<T> items, K? getValue(T a), {bool equalityCheck(K? a, K? b)?}) → K?
Checks that all the retrieved values for an item are the same. If they're the same, it returns the equal value, otherwise it'll return null. A custom equalityCheck can be provided for objects that don't override their equality operator or need more sophisticated rules of equality (for example if your K is a collection). TODO: have two functions; one to check is all are equal, another to get the value?
isChildOf<T extends Parentable<T>>(T child, Iterable<T> parents) bool
iterableEquals<T>(Iterable<T>? list1, Iterable<T>? list2, {bool equalityCheck(T a, T b)?}) bool
Check if an iterable is equal to another iterable. Iterables are considered equal if they have the same number of values and each of those values are equal. A custom equalityCheck can be provided for objects that don't override their equality operator or need to be deemed equal based on varying application logic.
listEquals<T>(List<T> list1, List<T> list2, {bool equalityCheck(T a, T b)?}) bool
Check if a list of items is equal to another list of items. Lists are considered equal if they have the same number of values and each of those values are equal. A custom equalityCheck can be provided for objects that don't override their equality operator or need to be deemed equal based on varying application logic.
setEquals<T>(Iterable<T>? it1, Iterable<T>? it2) bool
Returns true if all the elemnts in iterable1 are contained in iterable2. Assumes there are no dupes in either iterable.
tops<T extends Parentable<T>>(Iterable<T> parentables) Set<T>
Get the top most components (any child that has an ancestor in the set should be pruned).