links method
Get all the links of this node
(Optional) Only if it matches any of anyTags
and matches all items in allTags
Implementation
Iterable links(val, {List anyTags = const [], List allTags = const []}) {
final _v = _map_add_or_get(val, _newNode);
if (anyTags.isEmpty && allTags.isEmpty) {
final from = _v.from.map((n) => _node_to_val[n]);
final to = _v.to.keys.map((n) => _node_to_val[n]);
return _concat(from, to).toSet();
} else {
final from = _v.from
.where((n) =>
_check_all_any_tags(n, _v, anyTags: anyTags, allTags: allTags))
.map((n) => _node_to_val[n]);
final to = _v.to.keys
.where((n) =>
_check_all_any_tags(_v, n, anyTags: anyTags, allTags: allTags))
.map((n) => _node_to_val[n]);
return _concat(from, to).toSet();
}
}