https://kotlinlang.org logo
k

karelpeeters

05/22/2018, 3:30 PM
You code could be cleaned up a lot too, chekcing if it's null and throwing an exception otherwise is just
!!
, and use
find
or
first
instead of a for loop.