mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-07 01:35:16 +08:00
style: include LII_LIST_INDEXED_ITERATING
(#5190)
This commit is contained in:
@ -141,9 +141,6 @@
|
|||||||
<Match>
|
<Match>
|
||||||
<Bug pattern="TR_TAIL_RECURSION" />
|
<Bug pattern="TR_TAIL_RECURSION" />
|
||||||
</Match>
|
</Match>
|
||||||
<Match>
|
|
||||||
<Bug pattern="LII_LIST_INDEXED_ITERATING" />
|
|
||||||
</Match>
|
|
||||||
<Match>
|
<Match>
|
||||||
<Bug pattern="USBR_UNNECESSARY_STORE_BEFORE_RETURN" />
|
<Bug pattern="USBR_UNNECESSARY_STORE_BEFORE_RETURN" />
|
||||||
</Match>
|
</Match>
|
||||||
|
@ -40,8 +40,8 @@ public class FCFSScheduling {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void evaluateTurnAroundTime() {
|
private void evaluateTurnAroundTime() {
|
||||||
for (int i = 0; i < processes.size(); i++) {
|
for (final var process : processes) {
|
||||||
processes.get(i).setTurnAroundTimeTime(processes.get(i).getBurstTime() + processes.get(i).getWaitingTime());
|
process.setTurnAroundTimeTime(process.getBurstTime() + process.getWaitingTime());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,8 @@ public class RRScheduling {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void evaluateWaitingTime() {
|
private void evaluateWaitingTime() {
|
||||||
for (int i = 0; i < processes.size(); i++) processes.get(i).setWaitingTime(processes.get(i).getTurnAroundTimeTime() - processes.get(i).getBurstTime());
|
for (final var process : processes) {
|
||||||
|
process.setWaitingTime(process.getTurnAroundTimeTime() - process.getBurstTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user