KT-20357 Add samples for elementAtOrNull

This commit is contained in:
Takayuki Matsubara
2018-09-15 21:25:05 +09:00
committed by Ilya Gorbunov
parent ad9b700ec4
commit 7d5efe7f51
6 changed files with 38 additions and 0 deletions
@@ -328,6 +328,7 @@ object Elements : TemplateGroupBase() {
include(CharSequences, Lists)
} builder {
doc { "Returns ${f.element.prefixWithArticle()} at the given [index] or `null` if the [index] is out of bounds of this ${f.collection}." }
sample("samples.collections.Collections.Usage.elementAtOrNull")
returns("T?")
body {
"""