Japanese Looping
GroovyはJavaのように通常のwhile {...} のループをサポートします。
forループ
Groovyのforフープはかなりシンプルで、配列、コレクション、Mapなどが使えます。
注意: 標準のforループはbeta-10まで実装されていませんでした。
// for (int i = 0; i < 5; ++i) // はbeta-10まで実装されていませんでした。
クロージャ
ほとんどの場合、each()やeachWithIndex()を使うことでforループの換わりにクロージャを使うことが出来ます。
Search
Results of your search request can come from various sources: the Groovy website itself,
the JIRA issues, the API documentation, as well as a few other interesting Groovy-related blogs.
|
|
![]()
By
- pages
- views
- last modified
|