@Override public int compareTo(Edge other){
  int cmp=super.compareTo(other);
  if (cmp != 0) {
    return cmp;
  }
  return type - other.type;
}

@ Override public int compareTo ( Edge other ) { int cmp = super . compareTo ( other ) ; if ( cmp != 0 ) { return cmp ; } return type - other . type ; }
compare with other edge .
