Generic, reusable shortest route finder java implementations