values method

Iterable values(
  1. dynamic val,
  2. dynamic key, {
  3. List anyTags = const [],
  4. List allTags = const [],
})
override

Get all the values on all links of this node

(Optional) Only if it matches any of anyTags and matches all items in allTags

Implementation

Iterable values(val, key,
    {List anyTags = const [], List allTags = const []}) {
  final _v = _map_add_or_get(val, _newNode);

  final bool Function(Maybe) where = anyTags.isEmpty && allTags.isEmpty
      ? (m) => m is Some
      : (m) => m is Some
          ? _check_all_any_val_tags(_v, m.val, key,
              anyTags: anyTags, allTags: allTags)
          : false;

  final a = _v.to.keys.map((n) => _v.tryGet(n, key));
  final b = _v.from.map((n) => n.tryGet(_v, key));
  return _concat(a, b).where(where).map((s) => s.val).toSet();
}