Joe
02/26/2019, 5:38 PMMap<String, (Int)->Boolean> and a Map<String, (String)->Boolean>. I'd like to combine them to get a Map<String, (Any)->Boolean>, but can't quite figure out how to do so safely. I can safely cast to Map<String, *> or Map<String, Any?> without an unchecked cast warning, but I can't safely cast to `Map<String, (*)->Boolean>`(compile error) or Map<String, (Any?)->Boolean> (unchecked cast)Joe
02/26/2019, 5:55 PMMap<String, Any?> ?robstoll
02/26/2019, 6:24 PMMap<String, Pair<KClass<*>, (Any) -> Boolean>> and you would need to apply the check for the parameter based on the KClass during runtime to stay safe.Joe
02/26/2019, 10:42 PMPredicateGenerator<T> that takes a <T> value in its constructor args, but exposes a getPredicate() that returns T/F based on the constructor args. Then I can, for example, AND a bunch of those together without having to know about the "inner" generic instance.