There are many functions for filtering collections, if you want to save only the values that correspond "January", you can use a simple one filter():
val months = listOf("January", "February", "March")
months.filter { month -> month == "January" } // with explicit parameter name
months.filter { it == "January" } // with implicit parameter name "it"
This will give you a list containing only "January".
, "January", != filterNot()
months.filter { it != "January" }
months.filterNot { it == "January" }
, "February" "March".
, Java, == != Kotlin equals . . equality.
API.