mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-29 01:44:36 -04:00
623 B
623 B
mapped_pages | products | ||||
---|---|---|---|---|---|
|
|
Lambdas [painless-lambdas]
Lambda expressions and method references work the same as in Java.
list.removeIf(item -> item == 2);
list.removeIf((int item) -> item == 2);
list.removeIf((int item) -> { item == 2 });
list.sort((x, y) -> x - y);
list.sort(Integer::compare);
You can make method references to functions within the script with this
, for example list.sort(this::mycompare)
.