A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of github.com:simgrid/simgrid
[simgrid.git]
/
examples
/
java
/
dht
/
kademlia
/
Answer.java
diff --git
a/examples/java/dht/kademlia/Answer.java
b/examples/java/dht/kademlia/Answer.java
index
1421529
..
7a34831
100644
(file)
--- a/
examples/java/dht/kademlia/Answer.java
+++ b/
examples/java/dht/kademlia/Answer.java
@@
-16,18
+16,18
@@
public class Answer {
public Answer(int destinationId) {
this.destinationId = destinationId;
public Answer(int destinationId) {
this.destinationId = destinationId;
- nodes = new ArrayList<
Contact
>();
+ nodes = new ArrayList<>();
}
}
- int getDestinationId() {
+
protected
int getDestinationId() {
return destinationId;
}
return destinationId;
}
- ArrayList<Contact> getNodes() {
+
protected
ArrayList<Contact> getNodes() {
return nodes;
}
return nodes;
}
- int size() {
+
protected
int size() {
return nodes.size();
}
return nodes.size();
}
@@
-59,7
+59,7
@@
public class Answer {
/* Returns if the destination has been found */
public boolean destinationFound() {
/* Returns if the destination has been found */
public boolean destinationFound() {
- if (nodes.
size() < 1
) {
+ if (nodes.
isEmpty()
) {
return false;
}
Contact tail = nodes.get(0);
return false;
}
Contact tail = nodes.get(0);