public static interface MidiLibrary.MapNode extends Comparable<MidiLibrary.MapNode>
MidiLibrary.Folder.| Modifier and Type | Method and Description |
|---|---|
Set<MidiLibrary.MapNode> |
getChildren()
Gets all of the children of this
MapNode. |
int |
getChildrenCount()
Gets the number of children this
MapNode contains. |
Set<MidiLibrary.MapNode> |
getChildrenRecursive()
Recursively gets all the children of this
MapNode, including those contained in
MidiLibrary.Folder-like structures stored in this MapNode. |
Set<String> |
getKeys()
Gets the names of all direct children of this
MapNode. |
Set<String> |
getKeysRecursive()
Recursively gets the names of all the children of this
MapNode, including those
contained in MidiLibrary.Folder-like structures stored in this MapNode. |
MediaMetadataCompat |
getMetadata()
Gets the metadata of this
MapNode. |
String |
getName()
Gets the name of this
MapNode. |
String |
getNameGlobal()
Gets the fully-qualified name of this
MapNode. |
String |
getParentName()
Returns the fully-qualified name of this
MapNode's parent, or null if the
MapNode doesn't have a parent.To expand on the example provided at getNameGlobal(), getParentName would return
ROOT_FOLDER/Music/Folk/Korobeiniki. |
boolean |
hasChildren()
Checks if this
MapNode has any children. |
boolean |
isFile()
Checks whether this
MapNode is a "file" or "folder", where a folder is defined as
any MapNode implementation that stores other MapNodes, and a file is defined
as any other implementation.Implementers must override to always return true or false
in compliance with the above contract. |
compareToboolean hasChildren()
MapNode has any children.true if this MapNode has children, otherwise falseSet<MidiLibrary.MapNode> getChildren()
MapNode. Returns null if the MapNode's
implementation doesn't store children.null if the MapNode implementation doesn't store children, otherwise the
Set of all childrenSet<MidiLibrary.MapNode> getChildrenRecursive()
MapNode, including those contained in
MidiLibrary.Folder-like structures stored in this MapNode. Returns null if
the MapNode's implementation doesn't store children.Set of all descendantsMidiLibrary.Folder.getChildrenRecursive()int getChildrenCount()
MapNode contains. Returns -1 if the implementation
doesn't store children.-1 if children aren't supported, otherwise the number of stored childrenSet<String> getKeys()
MapNode. Returns null if the
implementation doesn't store childrenSet of all children namesSet<String> getKeysRecursive()
MapNode, including those
contained in MidiLibrary.Folder-like structures stored in this MapNode. Returns null
if the MapNode's implementation doesn't store childrenSet of all names of children which have no childrenboolean isFile()
MapNode is a "file" or "folder", where a folder is defined as
any MapNode implementation that stores other MapNodes, and a file is defined
as any other implementation.true or false
in compliance with the above contract.true if the implementation stores MapNodes, otherwise falseString getName()
MapNode.String getNameGlobal()
MapNode. This name includes all parent path
segments leading up to the root directory.MidiLibrary.MidiFile {code Tetris.mid} could be housed in a tree of MidiLibrary.Folders:ROOT_FOLDER -> Music -> Folk -> Korobeiniki -> Tetris.midgetName method must return Tetris.mid, and the getNameGlobal method
must return ROOT_FOLDER/Music/Folk/Korobeiniki/Tetris.mid.MediaMetadataCompat getMetadata()
MapNode.String getParentName()
MapNode's parent, or null if the
MapNode doesn't have a parent.getNameGlobal(), getParentName would return
ROOT_FOLDER/Music/Folk/Korobeiniki.