Mani
10/11/2019, 7:38 PMPavlo Liapota
10/11/2019, 8:04 PMMani
10/11/2019, 8:04 PMval labelByCategoryMap = mapOf(
ShippingLabelCategoryConstants.FRESH to FreshLabelPrinter,
ShippingLabelCategoryConstants.PHARMA to PharmaLabelPrinter
)
where FreshLabelPrinter, PharmaLabelPrinter
are objectsPavlo Liapota
10/11/2019, 8:06 PMMani
10/11/2019, 8:08 PMPavlo Liapota
10/11/2019, 8:16 PMFreshLabelPrinter
does not implement any interface, so I can guess that your map labelByCategoryMap
will have type Map<ShippingLabelCategoryConstants, Any>
, that’s why method is not available.Mani
10/11/2019, 8:18 PMPavlo Liapota
10/11/2019, 8:31 PMMani
10/11/2019, 8:32 PM