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 11package com .thealgorithms .scheduling ;
22
33import java .util .ArrayList ;
4+ import java .util .Collection ;
45import java .util .Collections ;
56import java .util .List ;
67import java .util .Random ;
@@ -23,10 +24,10 @@ public final class RandomScheduling {
2324 /**
2425 * Constructs a new RandomScheduling instance.
2526 *
26- * @param tasks A list of task names to be scheduled.
27+ * @param tasks A collection of task names to be scheduled.
2728 * @param random A Random instance for generating random numbers.
2829 */
29- public RandomScheduling (List <String > tasks , Random random ) {
30+ public RandomScheduling (Collection <String > tasks , Random random ) {
3031 this .tasks = new ArrayList <>(tasks ); // Store tasks locally
3132 this .random = random ;
3233 }
You can’t perform that action at this time.
0 commit comments