Joan Colmenero
02/26/2020, 8:23 PMinterface BaseInterface<F,I> {
fun example(foo: F, params: I? = null)
}
I want to add params but as a generic on a method is there any idiomatic way to do it?
But I do not want to declare it for every classes that implements this AnInterfaceMike
02/26/2020, 8:36 PMfun example(foo:F, vararg params:I)
will do it. I believe a vararg
is optional.
params will be an Array<I>.Joan Colmenero
02/26/2020, 8:37 PMJoan Colmenero
02/26/2020, 8:37 PMMike
02/26/2020, 8:53 PM