ui.Map.Linker.set
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Ustawia element w określonym indeksie. Jeśli indeks przekracza indeks ostatniego elementu listy, element zostanie dodany na końcu listy.
Zwraca ui.data.ActiveList.
Wykorzystanie | Zwroty |
---|
Linker.set(index, el) | ui.data.ActiveList |
Argument | Typ | Szczegóły |
---|
to: ui.data.activelist | ui.data.ActiveList | Instancja ui.data.ActiveList. |
index | Liczba | Indeks do zastąpienia. |
el | Obiekt | Element do ustawienia. |
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\u003eset\u003c/code\u003e method allows you to modify an element at a specific index within a ui.data.ActiveList.\u003c/p\u003e\n"],["\u003cp\u003eIf the provided index goes beyond the existing elements, the new element is appended to the end of the list.\u003c/p\u003e\n"],["\u003cp\u003eIt always returns the original ui.data.ActiveList instance, enabling method chaining.\u003c/p\u003e\n"]]],["The `set` function modifies a `ui.data.ActiveList` instance. It places an element (`el`) at a given `index`. If the `index` is beyond the current list's bounds, the element is appended to the end. The function returns the modified `ui.data.ActiveList` instance itself. It requires an index (Number) and an element (Object) as arguments, where the index will be overwritten by the provided element.\n"],null,["# ui.Map.Linker.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| Linker.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. |"]]