diff options
Diffstat (limited to 'src/Chapter5/support/NodeIDComparator.java')
-rw-r--r-- | src/Chapter5/support/NodeIDComparator.java | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/Chapter5/support/NodeIDComparator.java b/src/Chapter5/support/NodeIDComparator.java deleted file mode 100644 index 0b41ae7..0000000 --- a/src/Chapter5/support/NodeIDComparator.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ - -package Chapter5.support; - -import java.util.Comparator; - -/** - * - * @author shamanth - */ -public class NodeIDComparator implements Comparator -{ - - public int compare(Object o1, Object o2) { - int id1 = ((NetworkNode) o1).id; - int id2 = ((NetworkNode) o2).id; - if(id1>id2) - { - return 1; - } - else - if(id1<id2) - return -1; - else - return 0; - } - - -} |