Share via


Preferences.RemoveNode Method

Definition

Removes this preference node and all of its descendants, invalidating any preferences contained in the removed nodes.

[Android.Runtime.Register("removeNode", "()V", "GetRemoveNodeHandler")]
public abstract void RemoveNode ();
[<Android.Runtime.Register("removeNode", "()V", "GetRemoveNodeHandler")>]
abstract member RemoveNode : unit -> unit
Attributes

Exceptions

if the backing store is unavailable or causes an operation failure.

if this node has been removed.

if this is a root node.

Remarks

Removes this preference node and all of its descendants, invalidating any preferences contained in the removed nodes. Once a node has been removed, attempting any method other than #name(), #absolutePath(), #isUserNode(), #flush() or #node(String) nodeExists("") on the corresponding Preferences instance will fail with an IllegalStateException. (The methods defined on Object can still be invoked on a node after it has been removed; they will not throw IllegalStateException.)

The removal is not guaranteed to be persistent until the flush method is called on this node (or an ancestor).

If this implementation supports stored defaults, removing a node exposes any stored defaults at or below this node. Thus, a subsequent call to nodeExists on this node's path name may return true, and a subsequent call to node on this path name may return a (different) Preferences instance representing a non-empty collection of preferences and/or children.

Java documentation for java.util.prefs.Preferences.removeNode().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to