File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/java/com/thealgorithms/scheduling Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
package com .thealgorithms .scheduling ;
2
2
3
3
import java .util .ArrayList ;
4
+ import java .util .Collection ;
4
5
import java .util .Collections ;
5
6
import java .util .List ;
6
7
import java .util .Random ;
@@ -23,10 +24,10 @@ public final class RandomScheduling {
23
24
/**
24
25
* Constructs a new RandomScheduling instance.
25
26
*
26
- * @param tasks A list of task names to be scheduled.
27
+ * @param tasks A collection of task names to be scheduled.
27
28
* @param random A Random instance for generating random numbers.
28
29
*/
29
- public RandomScheduling (List <String > tasks , Random random ) {
30
+ public RandomScheduling (Collection <String > tasks , Random random ) {
30
31
this .tasks = new ArrayList <>(tasks ); // Store tasks locally
31
32
this .random = random ;
32
33
}
You can’t perform that action at this time.
0 commit comments