diff --git a/src/main/java/fr/ntr/scheduler/RoundRobin.java b/src/main/java/fr/ntr/scheduler/RoundRobin.java index 1eba846..fa4ee9a 100644 --- a/src/main/java/fr/ntr/scheduler/RoundRobin.java +++ b/src/main/java/fr/ntr/scheduler/RoundRobin.java @@ -9,14 +9,12 @@ import fr.ntr.User; public class RoundRobin extends Scheduler { - private String name; private int index; - private List users; - private ResourceBlock[][] frame; + private final List users; + private final ResourceBlock[][] frame; - public RoundRobin(String name, int index, ResourceBlock[][] frame, List users) { - this.name = name; + public RoundRobin(int index, ResourceBlock[][] frame, List users) { this.index = index; this.frame = frame; this.users = users; @@ -42,7 +40,7 @@ public class RoundRobin extends Scheduler { users.get(index).getPacketsSent().add(users.get(index).getPacketsToSend().get(0)); users.get(index).getPacketsToSend().remove(users.get(index).getPacketsToSend().get(0)); //on ajoute l'utilisateur a la frame - User user = UserSelection(ts, sp, users); + User user = UserSelection(ts, sp); frame[ts][sp].setUser(user); frame[ts][sp].setBandwidth(user.getBandwidthTable()[ts][sp]); } @@ -54,10 +52,9 @@ public class RoundRobin extends Scheduler { /** * @param ts Time slot (int) * @param sp Sous porteuse(int) - * @param Users (List) * Return the user in function of TS and SP selected */ - private User UserSelection(int ts, int sp, List Users) { + private User UserSelection(int ts, int sp) { //compte le nombre de bloc attribue for (int i = 0; i < ts; i++){ for (int j = 0; j < sp; j++) {