package kruskal; public class Edge{ private Vertex fromVertex=null, toVertex=null; private double weight; public Edge(Vertex from, Vertex to, double weight){ this.fromVertex = from; this.toVertex = to; this.weight = weight; } public Vertex getFrom(){ return this.fromVertex; } public Vertex getTo(){ return this.toVertex; } public double getWeight(){ return this.weight; } }