Pengumuman: Semua project nonkomersial yang terdaftar untuk menggunakan Earth Engine sebelum
15 April 2025 harus
memverifikasi kelayakan nonkomersial untuk mempertahankan akses Earth Engine.
ui.data.ActiveDictionary.set
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Menetapkan nilai properti tertentu. Menampilkan error jika kunci yang diberikan tidak didukung oleh objek. Lihat parameter konstruktor untuk melihat properti mana yang dapat disetel.
Menampilkan ui.data.ActiveDictionary ini.
Penggunaan | Hasil |
---|
ActiveDictionary.set(keyOrDict, value) | ui.data.ActiveDictionary |
Argumen | Jenis | Detail |
---|
ini: ui.data.activedictionary | ui.data.ActiveDictionary | Instance ui.data.ActiveDictionary. |
keyOrDict | Object|String | Kunci properti yang akan ditetapkan atau kamus pasangan nilai kunci yang akan ditetapkan pada objek. |
value | Objek, opsional | Nilai baru properti. Ini diperlukan saat argumen pertama adalah string kunci. |
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-26 UTC.
[null,null,["Terakhir diperbarui pada 2025-07-26 UTC."],[[["\u003cp\u003e\u003ccode\u003eActiveDictionary.set()\u003c/code\u003e allows modification of properties within a \u003ccode\u003eui.data.ActiveDictionary\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eIt accepts either a key-value pair or a dictionary of key-value pairs to update the object's properties.\u003c/p\u003e\n"],["\u003cp\u003eAn error is thrown if an unsupported key is provided, refer to the constructor's parameters for valid keys.\u003c/p\u003e\n"],["\u003cp\u003eThe method returns the updated \u003ccode\u003eui.data.ActiveDictionary\u003c/code\u003e instance for chaining purposes.\u003c/p\u003e\n"]]],["The `ActiveDictionary.set` method sets a property's value or multiple properties from a dictionary. It accepts a key (string) and a value, or a dictionary of key-value pairs. If the provided key is invalid, an error is thrown. When setting a single property, a value must be provided. The method returns the `ui.data.ActiveDictionary` instance, allowing for method chaining. The `keyOrDict` argument determines the type of operation to perform, either setting one value or several.\n"],null,["# ui.data.ActiveDictionary.set\n\n\u003cbr /\u003e\n\nSets the value of a given property. Throws an error if the key provided is not supported by the object. Look at the constructor's parameters to see which properties can be set.\n\n\u003cbr /\u003e\n\nReturns this ui.data.ActiveDictionary.\n\n| Usage | Returns |\n|----------------------------------------------|--------------------------|\n| ActiveDictionary.set`(keyOrDict, `*value*`)` | ui.data.ActiveDictionary |\n\n| Argument | Type | Details |\n|----------------------------------|--------------------------|------------------------------------------------------------------------------------------------|\n| this: `ui.data.activedictionary` | ui.data.ActiveDictionary | The ui.data.ActiveDictionary instance. |\n| `keyOrDict` | Object\\|String | Either the key of the property to set or a dictionary of key/value pairs to set on the object. |\n| `value` | Object, optional | The property's new value. This is required when the first argument is a key string. |"]]