Skip to content

Instantly share code, notes, and snippets.

@shkschneider
Created February 25, 2019 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shkschneider/e28c84edd53f45d0ece7ee99dc8e79a4 to your computer and use it in GitHub Desktop.
Save shkschneider/e28c84edd53f45d0ece7ee99dc8e79a4 to your computer and use it in GitHub Desktop.
fun requireNotNulls(vararg any: Any?) {
any.forEach {
requireNotNull(value = it)
}
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
requireNotNulls(id1, id2)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment