Stay organized with collections
Save and categorize content based on your preferences.
DumpableContainer
public
interface
DumpableContainer
android.util.DumpableContainer
|
Represents a container that manages dumpables
.
Summary
Public methods
addDumpable
public abstract boolean addDumpable (Dumpable dumpable)
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 . |
Returns |
boolean |
true if the dumpable was added, false if the call was ignored. |
removeDumpable
public abstract boolean removeDumpable (Dumpable dumpable)
Removes the given dumpable
from the container.
Parameters |
dumpable |
Dumpable : dumpable to be removed.
This value cannot be null . |
Returns |
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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nDumpableContainer\n=================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/util/DumpableContainer \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\n\ninterface\nDumpableContainer\n`\n\n\n`\n\n\n`\n\n|--------------------------------|\n| android.util.DumpableContainer |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nRepresents a container that manages [dumpables](/reference/android/util/Dumpable).\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract boolean` | ` `[addDumpable](/reference/android/util/DumpableContainer#addDumpable(android.util.Dumpable))`(`[Dumpable](/reference/android/util/Dumpable)` dumpable) ` Adds the given [dumpable](/reference/android/util/Dumpable) to the container. |\n| ` abstract boolean` | ` `[removeDumpable](/reference/android/util/DumpableContainer#removeDumpable(android.util.Dumpable))`(`[Dumpable](/reference/android/util/Dumpable)` dumpable) ` Removes the given [dumpable](/reference/android/util/Dumpable) from the container. |\n\nPublic methods\n--------------\n\n### addDumpable\n\nAdded in [API level 33](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract boolean addDumpable (Dumpable dumpable)\n```\n\nAdds the given [dumpable](/reference/android/util/Dumpable) to the container.\n\nIf a dumpable with the same [name](/reference/android/util/Dumpable#getDumpableName()) was added before, this\ncall is ignored.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|-----------------------------------------------------------------------|\n| `dumpable` | `Dumpable`: dumpable to be added. This value cannot be `null`. \u003cbr /\u003e |\n\n| Returns ||\n|-----------|---------------------------------------------------------------------------|\n| `boolean` | `true` if the dumpable was added, `false` if the call was ignored. \u003cbr /\u003e |\n\n| Throws ||\n|---------------------------------------------------------------------------|---------------------------------------------------------------------------------------|\n| [IllegalArgumentException](/reference/java/lang/IllegalArgumentException) | if the [dumpable name](/reference/android/util/Dumpable#getDumpableName()) is `null`. |\n\n### removeDumpable\n\nAdded in [API level 33](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract boolean removeDumpable (Dumpable dumpable)\n```\n\nRemoves the given [dumpable](/reference/android/util/Dumpable) from the container.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|-------------------------------------------------------------------------|\n| `dumpable` | `Dumpable`: dumpable to be removed. This value cannot be `null`. \u003cbr /\u003e |\n\n| Returns ||\n|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `boolean` | `true` if the dumpable was removed, `false` if it was not previously [added](/reference/android/util/DumpableContainer#addDumpable(android.util.Dumpable)) with the same identify (object reference) and [name](/reference/android/util/Dumpable#getDumpableName()). \u003cbr /\u003e |"]]