KT-20357 Add samples for elementAt

This commit is contained in:
Takayuki Matsubara
2018-08-30 20:20:31 +09:00
committed by Ilya Gorbunov
parent 40b3514a47
commit ad9b700ec4
6 changed files with 39 additions and 0 deletions
@@ -242,6 +242,7 @@ object Elements : TemplateGroupBase() {
} builder {
val index = '$' + "index"
doc { "Returns ${f.element.prefixWithArticle()} at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this ${f.collection}." }
sample("samples.collections.Collections.Usage.elementAt")
returns("T")
body {
"""