ee.List.set
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
مقدار را در مکان مشخص شده در لیست با عنصر جایگزین می کند. یک شاخص منفی از انتهای لیست به عقب محاسبه می شود.
استفاده | برمی گرداند | List. set (index, element) | فهرست کنید |
استدلال | تایپ کنید | جزئیات | این: list | فهرست کنید | |
index | عدد صحیح | |
element | شیء | |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThe \u003ccode\u003eset\u003c/code\u003e method replaces a value within a list at a given index with a new element.\u003c/p\u003e\n"],["\u003cp\u003eIt accepts the list, the index to modify, and the new element as arguments.\u003c/p\u003e\n"],["\u003cp\u003eNegative indexing is supported, enabling modification from the end of the list.\u003c/p\u003e\n"],["\u003cp\u003eThe method returns the modified list.\u003c/p\u003e\n"]]],["The `List.set(index, element)` function replaces a list element at a given position. The `index` argument, an integer, determines the position, and negative values indicate counting from the end. The `element`, of any object type, is the new value. This operation modifies the original list and returns the updated list. No other arguments are required besides the list itself.\n"],null,["# ee.List.set\n\nReplaces the value at the specified position in list with element. A negative index counts backwards from the end of the list.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|----------------------------|---------|\n| List.set`(index, element)` | List |\n\n| Argument | Type | Details |\n|--------------|---------|---------|\n| this: `list` | List | |\n| `index` | Integer | |\n| `element` | Object | |"]]