// File: ConstraintEdge.java // Classes: ConstraintEdge // Author: Kedar Patankar package edu.neu.ccs.demeter.tools.apstudio.graphedit; /* Purpose : Represent strategy edge with constraints */ public class ConstraintEdge { private String _from,_to,_name; public ConstraintEdge(String from,String name,String to) { _from = from; _to = to; _name = name; } public String toString() { String desc =new String(); if(_name==null) desc = "=> " + _from + ", " + _to; else desc = "-> " + _from + ", " + _name + ", " + _to; return desc; } public boolean equals(Object o) { ConstraintEdge be = (ConstraintEdge)o; if(!be.get_from().equals(this.get_from())) return false; if(!be.get_to().equals(this.get_to())) return false; if(be.get_name()==null) return true; if(!be.get_name().equals(this.get_name())) return false; return true; } public String get_from(){return _from;} public String get_to(){return _to;} public String get_name(){return _name;} } /* end class ConstraintEdge */