All pastes #462968 Raw Edit

Untitled

public text v1 · immutable
#462968 ·published 2007-04-28 17:36 UTC
rendered paste body
/**
 * Edge.java
 *
 * Version:
 *     $Id$
 * 
 * Revisions:
 *     $Log$
 */

/**
 * This class holds the edge data
 *
 * @author  Varghese Mathew
 */

public class Edge<String,Integer> {

   String name;
   int distance;

   /**
    * Constructor
    *
    * @param   name  the name 
    * @param   distance the distance
    */

   public Edge(String name, int distance) {
      this.name=name;
      this.distance=distance;
   }

   /**
    * name accessor
    *
    * @return  the name
    */

   public String getName() {
      return name;
   }

   /**
    * distance accessor
    *
    * @return  the distance
    */

   public int getDistance() {
      return distance;
   }

}