How to use less than (<) or greater than (>) operator in kotlin?
I have checked comparedTo(other: Int?)
function, but it only returns Int?
.
class Adapter{
private var mNewsCategories: List<NewsCategory>? = null
//......
val isAnything= this.mNewsCategories?.size?.compareTo(0))
//......
}
The val isAnything
returns another Int?
. Actually, I need a Boolean
variable.
Thanks in advance