citiususc / hipster

Hipster4j is a lightweight and powerful heuristic search library for Java and Android. It contains common, fully customizable algorithms such as Dijkstra, A* (A-Star), DFS, BFS, Bellman-Ford and more.
http://hipster4j.github.io
Apache License 2.0
325 stars 89 forks source link

Confusing usage of the GraphBuilder #119

Closed pablormier closed 9 years ago

pablormier commented 9 years ago

The current implementation of the GraphBuilder that exploits type inference is more confusing than useful in different contexts. The current implementation does not allow simple things such as:

builder = GraphBuilder.create();
builder.connect("A").to("B").withEdge(2);
builder.connect("A").to("C").withEdge(3); 
...

Not supporting these kind of typical usages of a builder pattern is clearly a wrong decision.