Kotlin equivalent of ternary operator
<p>So in java we have the ternary operator (?), which sometimes is useful to easy some value computed by a if-else inlines. For example:</p>

<pre><code>myAdapter.setAdapterItems(
            textToSearch.length == 0
            ? noteList
            : noteList.sublist(0, length-5)
)
</code></pre>

<p>I know the equivalent in kotlin would be:</p>

<pre><code>myAdapter.setAdapterItems(
                if(textToSearch.length == 0)
                    noteList
                else
                    noteList.sublist(0, length-5) 
)
</code></pre>

<p>But i just used to love the ternary operator in Java, for short expression conditions, and when passing values to a method. Is there any Kotlin equivalent?</p>