Ejemplo n.º 1
0
 @Override
 public String toString() {
   return "StartNode="
       + startNode
       + "\nAcceptedElements="
       + edgeLabel.getAcceptedElements()
       + "\nEndNode="
       + endNode
       + "\nEdgeLabelWeight= "
       + edgeLabel.getWeight()
       + " / "
       + edgeLabel.getMaxWeight();
 }
Ejemplo n.º 2
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((edgeLabel == null) ? 0 : edgeLabel.hashCode());
   result = prime * result + ((endNode == null) ? 0 : endNode.hashCode());
   result = prime * result + ((startNode == null) ? 0 : startNode.hashCode());
   return result;
 }
Ejemplo n.º 3
0
 @SuppressWarnings("unchecked")
 @Override
 public boolean equals(Object obj) {
   if (this == obj) {
     return true;
   }
   if (obj == null) {
     return false;
   }
   if (getClass() != obj.getClass()) {
     return false;
   }
   SinglePath<D> other = (SinglePath<D>) obj;
   if (edgeLabel == null) {
     if (other.edgeLabel != null) {
       return false;
     }
   } else if (!edgeLabel.equals(other.edgeLabel)) {
     return false;
   }
   if (endNode == null) {
     if (other.endNode != null) {
       return false;
     }
   } else if (!endNode.equals(other.endNode)) {
     return false;
   }
   if (startNode == null) {
     if (other.startNode != null) {
       return false;
     }
   } else if (!startNode.equals(other.startNode)) {
     return false;
   }
   return true;
 }