So, due to lack of methods like Long.valueOf(String s)
I am stuck.
How to convert String to Long in Kotlin?
It's interesting. Code like this:
val num = java.lang.Long.valueOf("2");
println(num);
println(num is kotlin.Long);
makes this output:
2
true
I guess, Kotlin makes conversion from java.lang.Long
and long primitive to kotlin.Long
automatically in this case. So, it's solution, but I would be happy to see tool without java.lang package usage.