I have a class that is initialized with an integer and a set. I want to create an auxiliary constructor that takes an integer and multiple parameters. These multiple parameters should be the contents of the set.
I need help calling the primary constructor with suitable arguments.
final class Soccer[A](max: Int, collection_num: Set[A]) {
///Auxiliary Constructor
/// new Soccer(n,A,B,C)` is equivalent to `new Soccer(n,Set(A,B,C))`.
///This constructor requires at least two candidates in order to avoid ambiguities with the
/// primary constructor.
def this(max: Int, first: A, second: A, other: A*) = {
///I need help calling the primary constructor with suitable arguments.
}
}
new Soccer(n,A,B,C)should be equivalent to
new Soccer(n,Set(A,B,C))