henrik
09/29/2017, 10:14 AMSet<Any>
, but the it is type
construct fails for me..
fun collectionOf(coll: Set<Any>, type: KClass<Any>) : String? {
return if (coll.any { it is type }) "all is ok" else "contains value(s) of type other than ${type::class.simpleName}"
}
collectionOf(someCollection, Map::class)