This repo contains an implementation of the Kruskal algorithm for finding the minimum spanning tree.
It uses the union find data structure for efficiency and it has been written with extensibility in mind.
Just extend the Node and the Edge class to suit your needs, and you are good to go!
For instance, you can extend them as adapters to your classes so that you don't even have to tweak your code.