Reputation: 25
I have a for each loop
for(conn in connection) {
var(first,second,third) = reader.getLatency(conn,LocationAssignment)
}
Where reader.getLatency is
open class LatencyReader {
companion object {
fun getLatency(conn: Connection, locationAssignment: HashMap<String, String>): Any {
return Triple(LatencyReader.MissingLatency, LatencyReader.MissingLatency, LatencyReader.MissingLatency)
}
val MissingLatency: Int = 9999
}
How can I access each element of reader.getLatency(conn,LocationAssignment), most importantly I want to access the last element or the third of the triple.
Upvotes: 0
Views: 1207
Reputation: 25
Why does
getLatency
returnAny
. It should returnTriple<Int, Int, Int>
, shouldn't it?
which was the solution.
Upvotes: 0