Typealias with generic
Let’s say I have a class container like this:
class Container
Then I have a handler like this:
interface Handler{
fun map(c:Container):Pair
fun add(c1:Container, c2:Container):Pair
}
Later I want to add another generic to container and handler, let’s call it F.
Or i want to remove B and C from container and handler.
Currently I have to make change at multiple places of the code, but I would like to have an opportunity to change the code not so often.
Like to create a typealias in handler:...