Moved from == as equality operator to .equals as realised that jgrapht doesn't depend on object identity for equality