Add samples for zip on arrays and collections

Write the sample references in the template and run the generator
This commit is contained in:
TakuyaKodama
2018-04-15 01:42:01 +09:00
committed by Ilya Gorbunov
parent 137698d967
commit 2d4e591b5d
4 changed files with 138 additions and 1 deletions
@@ -1005,6 +1005,8 @@ object Generators : TemplateGroupBase() {
doc {
"""
Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection.
@sample samples.collections.Iterables.Operations.zipIterableWithTransform
"""
}
typeParam("R")
@@ -1042,6 +1044,8 @@ object Generators : TemplateGroupBase() {
doc {
"""
Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection.
@sample samples.collections.Iterables.Operations.zipIterableWithTransform
"""
}
typeParam("R")
@@ -1079,6 +1083,8 @@ object Generators : TemplateGroupBase() {
doc {
"""
Returns a list of values built from elements of both collections with same indexes using provided [transform]. List has length of shortest collection.
@sample samples.collections.Iterables.Operations.zipIterableWithTransform
"""
}
typeParam("V")
@@ -1147,6 +1153,8 @@ object Generators : TemplateGroupBase() {
doc {
"""
Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection.
@sample samples.collections.Iterables.Operations.zipIterable
"""
}
typeParam("R")
@@ -1182,6 +1190,8 @@ object Generators : TemplateGroupBase() {
doc {
"""
Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection.
@sample samples.collections.Iterables.Operations.zipIterable
"""
}
typeParam("R")
@@ -1200,6 +1210,8 @@ object Generators : TemplateGroupBase() {
doc {
"""
Returns a list of pairs built from elements of both collections with same indexes. List has length of shortest collection.
@sample samples.collections.Iterables.Operations.zipIterable
"""
}
returns("List<Pair<T, T>>")