X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cc1751d13a6d2673b003820533ff1de78b540f43..ce2a02a088fe07b61de72c882d6e6a1f620d573b:/examples/java/kademlia/Contact.java diff --git a/examples/java/kademlia/Contact.java b/examples/java/kademlia/Contact.java deleted file mode 100644 index 0f95358ec1..0000000000 --- a/examples/java/kademlia/Contact.java +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (c) 2012-2014, 2016. The SimGrid Team. - * All rights reserved. */ - -/* This program is free software; you can redistribute it and/or modify it - * under the terms of the license (GNU LGPL) which comes with this package. */ - -package kademlia; - -public class Contact implements Comparable { - private int id; - private int distance; - - public Contact(int id, int distance) { - this.id = id; - this.distance = distance; - } - - public int getId() { - return id; - } - - public int getDistance() { - return distance; - } - - @Override - public boolean equals(Object x) { - return x.equals(id) ; - } - - @Override - public int compareTo(Object o) { - Contact c = (Contact)o; - if (distance < c.distance) { - return -1; - } - else if (distance == c.distance) { - return 0; - } - else { - return 1; - } - } - - @Override - public String toString() { - return "Contact [id=" + id + ", distance=" + distance + "]"; - } - -} \ No newline at end of file