27 Mart 2025'ten itibaren AOSP'yi derlemek ve AOSP'ye katkıda bulunmak için aosp-main
yerine android-latest-release
kullanmanızı öneririz. Daha fazla bilgi için AOSP'de yapılan değişiklikler başlıklı makaleyi inceleyin.
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
OptionUpdateRule
public
final
enum
OptionUpdateRule
extends Enum<OptionUpdateRule>
Bir seçenek birden çok kez belirtildiğinde davranışı kontrol eder. Bu enum'da, ayarlanacak değerlerin ERROR(/Collection)
veya ERROR(/Map)
olmadığının varsayıldığını unutmayın.
Özet
Herkese açık yöntemler |
boolean
|
shouldUpdate(String optionName, Object optionSource, Field field, Object update)
Mevcut değeri ve güncelleme değerini alır ve değerin güncellenmesi gerekip gerekmediğini döndürür.
|
static
OptionUpdateRule
|
valueOf(String name)
|
static
final
OptionUpdateRule[]
|
values()
|
Enum değerleri
FIRST
public static final OptionUpdateRule FIRST
Bir seçenek belirlendikten sonra, bu seçeneği güncellemeye yönelik sonraki girişimler göz ardı edilmelidir.
EN ÇOK
public static final OptionUpdateRule GREATEST
Comparable
seçenekleri için en büyük karşılaştırma değerine sahip olanı kullanın.
SON
public static final OptionUpdateRule LAST
Bir seçenek birden çok kez ayarlanırsa son değer dışındaki tüm değerler yoksayılır.
Herkese açık yöntemler
shouldUpdate
public boolean shouldUpdate (String optionName,
Object optionSource,
Field field,
Object update)
Mevcut değeri ve güncelleme değerini alır ve değerin güncellenmesi gerekip gerekmediğini döndürür. update
değerinin hiçbir zaman null olmadığı varsayılır.
Parametreler |
optionName |
String |
optionSource |
Object |
field |
Field |
update |
Object |
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-27 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-27 UTC."],[],[],null,["# OptionUpdateRule\n================\n\n\n`\npublic\n\nfinal\n\nenum\nOptionUpdateRule\n`\n\n\n`\n\n\n`\n\n`\n\nextends Enum\u003c`[OptionUpdateRule](../../../../../../reference/tradefed/com/android/tradefed/config/OptionUpdateRule.html)`\u003e\n\n\n`\n\n`\n\n\n`\n\n|---|---|----------------------------------------------|\n| java.lang.Object |||\n| ↳ | java.lang.Enum\\\u003c[com.android.tradefed.config.OptionUpdateRule](../../../../../../reference/tradefed/com/android/tradefed/config/OptionUpdateRule.html)\\\u003e ||\n| | ↳ | com.android.tradefed.config.OptionUpdateRule |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nControls the behavior when an option is specified multiple times. Note that this enum assumes\nthat the values to be set are not [ERROR(/Collection)](../../../../../../)s or [ERROR(/Map)](../../../../../../)s.\n\nSummary\n-------\n\n| ### Enum values ||\n|------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [OptionUpdateRule](../../../../../../reference/tradefed/com/android/tradefed/config/OptionUpdateRule.html) | `FIRST` once an option is set, subsequent attempts to update it should be ignored. |\n| [OptionUpdateRule](../../../../../../reference/tradefed/com/android/tradefed/config/OptionUpdateRule.html) | `GREATEST` for [Comparable](../../../../../../reference/tradefed/java/lang/Comparable.html) options, keep the one that compares as the greatest. |\n| [OptionUpdateRule](../../../../../../reference/tradefed/com/android/tradefed/config/OptionUpdateRule.html) | `IMMUTABLE` throw a [ConfigurationException](../../../../../../reference/tradefed/com/android/tradefed/config/ConfigurationException.html) if this option is set more than once. |\n| [OptionUpdateRule](../../../../../../reference/tradefed/com/android/tradefed/config/OptionUpdateRule.html) | `LAST` if an option is set multiple times, ignore all but the last value. |\n| [OptionUpdateRule](../../../../../../reference/tradefed/com/android/tradefed/config/OptionUpdateRule.html) | `LEAST` for [Comparable](../../../../../../reference/tradefed/java/lang/Comparable.html) options, keep the one that compares as the least. |\n\n| ### Public methods ||\n|------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` boolean` | ` `[shouldUpdate](../../../../../../reference/tradefed/com/android/tradefed/config/OptionUpdateRule.html#shouldUpdate(java.lang.String,%20java.lang.Object,%20Field,%20java.lang.Object))`(String optionName, Object optionSource, Field field, Object update) ` Takes the current value and the update value, and returns whether the value should be updated. |\n| ` static `[OptionUpdateRule](../../../../../../reference/tradefed/com/android/tradefed/config/OptionUpdateRule.html) | ` `[valueOf](../../../../../../reference/tradefed/com/android/tradefed/config/OptionUpdateRule.html#valueOf(java.lang.String))`(String name) ` |\n| ` static final `[OptionUpdateRule[]](../../../../../../reference/tradefed/com/android/tradefed/config/OptionUpdateRule.html) | ` `[values](../../../../../../reference/tradefed/com/android/tradefed/config/OptionUpdateRule.html#values())`() ` |\n\nEnum values\n-----------\n\n### FIRST\n\n```\npublic static final OptionUpdateRule FIRST\n```\n\nonce an option is set, subsequent attempts to update it should be ignored.\n\n\u003cbr /\u003e\n\n### GREATEST\n\n```\npublic static final OptionUpdateRule GREATEST\n```\n\nfor [Comparable](../../../../../../reference/tradefed/java/lang/Comparable.html) options, keep the one that compares as the greatest.\n\n\u003cbr /\u003e\n\n### IMMUTABLE\n\n```\npublic static final OptionUpdateRule IMMUTABLE\n```\n\nthrow a [ConfigurationException](../../../../../../reference/tradefed/com/android/tradefed/config/ConfigurationException.html) if this option is set more than once.\n\n\u003cbr /\u003e\n\n### LAST\n\n```\npublic static final OptionUpdateRule LAST\n```\n\nif an option is set multiple times, ignore all but the last value.\n\n\u003cbr /\u003e\n\n### LEAST\n\n```\npublic static final OptionUpdateRule LEAST\n```\n\nfor [Comparable](../../../../../../reference/tradefed/java/lang/Comparable.html) options, keep the one that compares as the least.\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### shouldUpdate\n\n```\npublic boolean shouldUpdate (String optionName, \n Object optionSource, \n Field field, \n Object update)\n```\n\nTakes the current value and the update value, and returns whether the value should be\nupdated. Assumes that `update` is never null.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------------|-----------------|\n| `optionName` | `String` \u003cbr /\u003e |\n| `optionSource` | `Object` \u003cbr /\u003e |\n| `field` | `Field` \u003cbr /\u003e |\n| `update` | `Object` \u003cbr /\u003e |\n\n| Returns ||\n|-----------|--------|\n| `boolean` | \u003cbr /\u003e |\n\n| Throws ||\n|------------------------------------------------------------------------------------------------------------------------|---|\n| [ConfigurationException](../../../../../../reference/tradefed/com/android/tradefed/config/ConfigurationException.html) | |\n\n### valueOf\n\n```\npublic static OptionUpdateRule valueOf (String name)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------|-----------------|\n| `name` | `String` \u003cbr /\u003e |\n\n| Returns ||\n|------------------------------------------------------------------------------------------------------------|--------|\n| [OptionUpdateRule](../../../../../../reference/tradefed/com/android/tradefed/config/OptionUpdateRule.html) | \u003cbr /\u003e |\n\n### values\n\n```\npublic static final OptionUpdateRule[] values ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------------|--------|\n| [OptionUpdateRule[]](../../../../../../reference/tradefed/com/android/tradefed/config/OptionUpdateRule.html) | \u003cbr /\u003e |"]]