예제 #1
0
 @Override
 public int compareTo(Node_2 n) {
   if (this.getValue() > n.getValue()) {
     return 1;
   } else if (this.getValue() < n.getValue()) {
     return -1;
   } else if (this.getDepth() < n.getDepth()) {
     return 1;
   } else if (this.getDepth() > n.getDepth()) {
     return -1;
   } else {
     return 0;
   }
 }