Refactor Event comparison logic for clarity and add getRandomChild method to ServerNodeState for improved child selection; update simulation tests for null checks and event processing

This commit is contained in:
2025-02-19 11:06:07 +01:00
parent c2b9d350aa
commit 121d4cd44a
4 changed files with 40 additions and 14 deletions

View File

@@ -23,11 +23,7 @@ public class Event implements Comparable<Event> {
@Override
public int compareTo(Event other) {
if (this.time < other.time)
return -1;
if (this.time == other.time)
return 0;
return 1;
return Double.compare(this.time, other.time);
}
/**