ee.List.sort
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מיון הרשימה בסדר עולה. אם מציינים את הארגומנט keys, הרשימה ממוינת קודם, והרכיבים של list ממוקמים באותו סדר.
שימוש | החזרות |
---|
List.sort(keys) | רשימה |
ארגומנט | סוג | פרטים |
---|
זה: list | רשימה | הרשימה שרוצים למיין. |
keys | רשימה, ברירת מחדל: null | מפתחות אופציונליים למיון לפי. אם מציינים את המאפיין 'keys', הוא חייב להיות באורך זהה למאפיין 'list'. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["\u003cp\u003e\u003ccode\u003eList.sort()\u003c/code\u003e arranges the elements of a list in ascending order, modifying the original list directly.\u003c/p\u003e\n"],["\u003cp\u003eAn optional \u003ccode\u003ekeys\u003c/code\u003e argument can be provided to specify the order in which elements should be sorted, requiring \u003ccode\u003ekeys\u003c/code\u003e to be the same length as the list being sorted.\u003c/p\u003e\n"]]],["The function `List.sort()` sorts a list in ascending order. It optionally accepts a `keys` argument, a list of the same length, to dictate the sort order. If `keys` is provided, the original `list` is reordered to match the sorted `keys`. The function returns the sorted `list`. If `keys` are not provided it sorts the list itself, by its values, in ascending order.\n"],null,["# ee.List.sort\n\nSorts the list into ascending order. If the 'keys' argument is provided, then it is sorted first, and the elements of 'list' are placed in the same order.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------------|---------|\n| List.sort`(`*keys*`)` | List |\n\n| Argument | Type | Details |\n|--------------|---------------------|------------------------------------------------------------------------------------------|\n| this: `list` | List | The list to sort. |\n| `keys` | List, default: null | Optional keys to sort by. If 'keys' is provided, it must have the same length as 'list'. |"]]