Description
GraphBuilder<T> addNode(T node)
allows to add duplicate nodes, however by doing so the method
GraphBuilder<T> addEdge(T from, T to)
is rendered unusable.
The fix is to ignore addition of node duplicates.
And while we are at it, we add a new Graph<T>#filter(Predicate<T>) method.