Stay organized with collections
Save and categorize content based on your preferences.
DumpableContainer
interface DumpableContainer
Represents a container that manages dumpables
.
Summary
Public methods
addDumpable
abstract fun addDumpable(dumpable: Dumpable): Boolean
Adds the given dumpable
to the container.
If a dumpable with the same name
was added before, this call is ignored.
Parameters |
dumpable |
Dumpable: dumpable to be added. This value cannot be null . |
Return |
Boolean |
true if the dumpable was added, false if the call was ignored. |
Exceptions |
java.lang.IllegalArgumentException |
if the dumpable name is null . |
removeDumpable
abstract fun removeDumpable(dumpable: Dumpable): Boolean
Removes the given dumpable
from the container.
Parameters |
dumpable |
Dumpable: dumpable to be removed. This value cannot be null . |
Return |
Boolean |
true if the dumpable was removed, false if it was not previously added with the same identify (object reference) and name . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# DumpableContainer\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nDumpableContainer\n=================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/util/DumpableContainer \"View this page in Java\") \n\n```\ninterface DumpableContainer\n```\n\n|-------------------------------------|\n| [android.util.DumpableContainer](#) |\n\nRepresents a container that manages [dumpables](/reference/kotlin/android/util/Dumpable).\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [addDumpable](#addDumpable(android.util.Dumpable))`(`dumpable:` `[Dumpable](/reference/kotlin/android/util/Dumpable)`)` Adds the given [dumpable](/reference/kotlin/android/util/Dumpable) to the container. |\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [removeDumpable](#removeDumpable(android.util.Dumpable))`(`dumpable:` `[Dumpable](/reference/kotlin/android/util/Dumpable)`)` Removes the given [dumpable](/reference/kotlin/android/util/Dumpable) from the container. |\n\nPublic methods\n--------------\n\n### addDumpable\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun addDumpable(dumpable: Dumpable): Boolean\n```\n\nAdds the given [dumpable](/reference/kotlin/android/util/Dumpable) to the container.\n\nIf a dumpable with the same [name](/reference/kotlin/android/util/Dumpable#getDumpableName()) was added before, this call is ignored.\n\n| Parameters ||\n|------------|---------------------------------------------------------------------------------------------------------|\n| `dumpable` | [Dumpable](/reference/kotlin/android/util/Dumpable): dumpable to be added. This value cannot be `null`. |\n\n| Return ||\n|------------------------------------------------------------------------------------|--------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true` if the dumpable was added, `false` if the call was ignored. |\n\n| Exceptions ||\n|--------------------------------------|----------------------------------------------------------------------------------------------|\n| `java.lang.IllegalArgumentException` | if the [dumpable name](/reference/kotlin/android/util/Dumpable#getDumpableName()) is `null`. |\n\n### removeDumpable\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun removeDumpable(dumpable: Dumpable): Boolean\n```\n\nRemoves the given [dumpable](/reference/kotlin/android/util/Dumpable) from the container.\n\n| Parameters ||\n|------------|-----------------------------------------------------------------------------------------------------------|\n| `dumpable` | [Dumpable](/reference/kotlin/android/util/Dumpable): dumpable to be removed. This value cannot be `null`. |\n\n| Return ||\n|------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true` if the dumpable was removed, `false` if it was not previously [added](#addDumpable(android.util.Dumpable)) with the same identify (object reference) and [name](/reference/kotlin/android/util/Dumpable#getDumpableName()). |"]]