ui.data.ActiveList.set
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
इस तरीके से, किसी एलिमेंट को तय किए गए इंडेक्स पर सेट किया जाता है. अगर इंडेक्स, सूची के आखिरी एलिमेंट के इंडेक्स से ज़्यादा है, तो एलिमेंट को सूची के आखिर में जोड़ दिया जाएगा.
यह ui.data.ActiveList दिखाता है.
इस्तेमाल | रिटर्न |
---|
ActiveList.set(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 और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThe \u003ccode\u003eset\u003c/code\u003e method allows modification of an element at a specific index within a \u003ccode\u003eui.data.ActiveList\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIf the given index is beyond the current list's bounds, the provided element is appended to the end.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eset\u003c/code\u003e returns the original \u003ccode\u003eui.data.ActiveList\u003c/code\u003e instance, enabling method chaining.\u003c/p\u003e\n"]]],[],null,["# ui.data.ActiveList.set\n\n\u003cbr /\u003e\n\nSets an element at the specified index. If the index exceeds that of the list's last element, the element will be added to the end of the list.\n\n\u003cbr /\u003e\n\nReturns this ui.data.ActiveList.\n\n| Usage | Returns |\n|-----------------------------|--------------------|\n| ActiveList.set`(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 to overwrite. |\n| `el` | Object | The element to set. |"]]