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
< 0or> 0?null < 0evaluate to?> 0would work semantically withnullvalues, since that's how I understood your suggestion.