raulraja
09/03/2017, 10:44 PMtakeWhile
which stops when the predicate is no longer valid, then with the resulting list you can call forEach
pablisco
09/03/2017, 10:51 PMprivate fun typeEquals(from: ParameterizedType, to: ParameterizedType, typeVarMap: Map<String, Type>): Boolean =
if (from.rawType == to.rawType) {
from.actualTypeArguments
.zip(to.actualTypeArguments)
.all { (from, to) -> matches(from, to, typeVarMap) }
} else {
false
}
Should work right?