ee.Array.sort
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Sortuje elementy tablicy wzdłuż jednej osi.
Wykorzystanie | Zwroty |
---|
Array.sort(keys) | Tablica |
Argument | Typ | Szczegóły |
---|
to: array | Tablica | Uporządkuj obrazy w tablicy. |
keys | Tablica, domyślnie: null | Opcjonalne klucze, według których można sortować. Jeśli nie podasz wartości, będą one używane jako klucze. Klucze mogą mieć wiele elementów tylko wzdłuż jednej osi, co określa kierunek sortowania. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[[["\u003cp\u003eThe \u003ccode\u003esort\u003c/code\u003e method arranges elements within an array along a single axis.\u003c/p\u003e\n"],["\u003cp\u003eBy default, \u003ccode\u003esort\u003c/code\u003e uses the array values for sorting; however, optional \u003ccode\u003ekeys\u003c/code\u003e can be specified for customized sorting based on another array with matching dimensions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ekeys\u003c/code\u003e array must have multiple elements along only one axis to determine the sort direction.\u003c/p\u003e\n"],["\u003cp\u003eThe modified array, with elements sorted according to the specified logic, is returned by the \u003ccode\u003esort\u003c/code\u003e method.\u003c/p\u003e\n"]]],[],null,["# ee.Array.sort\n\nSorts elements of the array along one axis.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|------------------------|---------|\n| Array.sort`(`*keys*`)` | Array |\n\n| Argument | Type | Details |\n|---------------|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `array` | Array | Array image to sort. |\n| `keys` | Array, default: null | Optional keys to sort by. If not provided, the values are used as the keys. The keys can only have multiple elements along one axis, which determines the direction to sort in. |"]]