ui.Map.Linker.insert
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
یک عنصر را در فهرست مشخص شده درج می کند و بقیه لیست را جابجا می کند. اگر شاخص مشخص شده بزرگتر از طول لیست باشد، عنصر به لیست اضافه می شود.
این ui.data.ActiveList را برمی گرداند.
استفاده | برمی گرداند | Linker. insert (index, el) | ui.data.ActiveList |
استدلال | تایپ کنید | جزئیات | این: ui.data.activelist | ui.data.ActiveList | نمونه ui.data.ActiveList. |
index | شماره | شاخصی که در آن عنصر درج می شود. |
el | شیء | عنصری که باید درج شود. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThe \u003ccode\u003einsert\u003c/code\u003e function adds an element to a \u003ccode\u003eui.data.ActiveList\u003c/code\u003e at a specific index, shifting existing elements if necessary.\u003c/p\u003e\n"],["\u003cp\u003eIf the provided index exceeds the list's length, the element is appended to the end.\u003c/p\u003e\n"],["\u003cp\u003eThe function returns the modified \u003ccode\u003eui.data.ActiveList\u003c/code\u003e instance for chaining purposes.\u003c/p\u003e\n"],["\u003cp\u003eThe function requires the index where the element should be inserted and the element itself as arguments.\u003c/p\u003e\n"]]],["The `insert` method adds an element (`el`) to a `ui.data.ActiveList` at a given `index`. If `index` exceeds the list's length, the element is appended. It shifts existing elements to accommodate the insertion. The method returns the modified `ui.data.ActiveList` instance. It takes three arguments: The `ui.data.ActiveList` itself, the index to insert the element, and the element to insert.\n"],null,["# ui.Map.Linker.insert\n\n\u003cbr /\u003e\n\nInserts an element at the specified index and shifts the rest of the list. If the specified index is greater than the length of the list, the element will be appended to the list.\n\n\u003cbr /\u003e\n\nReturns this ui.data.ActiveList.\n\n| Usage | Returns |\n|----------------------------|--------------------|\n| Linker.insert`(index, el)` | ui.data.ActiveList |\n\n| Argument | Type | Details |\n|----------------------------|--------------------|-------------------------------------------|\n| this: `ui.data.activelist` | ui.data.ActiveList | The ui.data.ActiveList instance. |\n| `index` | Number | The index at which to insert the element. |\n| `el` | Object | The element to insert. |"]]