共用方式為


AbstractPreferences.ChildrenNames Method

Definition

Implements the children method as per the specification in Preferences#childrenNames().

[Android.Runtime.Register("childrenNames", "()[Ljava/lang/String;", "GetChildrenNamesHandler")]
public override string[]? ChildrenNames ();
[<Android.Runtime.Register("childrenNames", "()[Ljava/lang/String;", "GetChildrenNamesHandler")>]
override this.ChildrenNames : unit -> string[]

Returns

String[]

the names of the children of this preference node.

Attributes

Exceptions

Remarks

Implements the children method as per the specification in Preferences#childrenNames().

This implementation obtains this preference node's lock, checks that the node has not been removed, constructs a TreeSet initialized to the names of children already cached (the children in this node's "child-cache"), invokes #childrenNamesSpi(), and adds all of the returned child-names into the set. The elements of the tree set are dumped into a String array using the toArray method, and this array is returned.

Java documentation for java.util.prefs.AbstractPreferences.childrenNames().

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