public static class MidiLibrary.MidiFile extends Object implements MidiLibrary.MapNode, Parcelable
MidiLibrary.Folder.Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>| Modifier and Type | Field and Description |
|---|---|
static Parcelable.Creator<MidiLibrary.MidiFile> |
CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE| Modifier | Constructor and Description |
|---|---|
protected |
MidiFile(Parcel in)
Creates a new
MidiFile from a Parcel. |
|
MidiFile(Uri uri,
String name,
int duration,
String artist,
String album,
String parentName,
String path)
Constructs a
MidiFile object. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(MidiLibrary.MapNode node)
Compares this
MidiFile with another MidiLibrary.MapNode and determines which should be sorted first. |
int |
describeContents()
Returns
0. |
boolean |
equals(Object o)
Checks whether this
MidiFile is equal to another Object. |
String |
getAlbum()
Gets the album this
MidiFile belongs to. |
String |
getArtist()
Gets the artist of this
MidiFile. |
Set<MidiLibrary.MapNode> |
getChildren()
Always returns
null. |
int |
getChildrenCount()
Always returns
-1. |
Set<MidiLibrary.MapNode> |
getChildrenRecursive()
Always returns
null. |
int |
getDuration()
Gets the duration (in milliseconds) of this
MidiFile. |
Set<String> |
getKeys()
Always returns
null. |
Set<String> |
getKeysRecursive()
Always returns
null. |
MediaMetadataCompat |
getMetadata()
Gets the metadata of this
MidiFile. |
String |
getName()
Gets the name of this
MidiFile. |
String |
getNameGlobal()
Gets the fully-qualified name of this
MidiFile. |
String |
getParentName()
Gets the fully-qualified name of this
MidiFile's parent. |
String |
getPath()
Gets the device path this file was found in.
|
Uri |
getUri()
Gets the
Uri of this MidiFile. |
boolean |
hasChildren()
Always returns
false. |
boolean |
isFile()
Always returns
true. |
void |
writeToParcel(Parcel dest,
int flags)
Writes this
MidiFile to a Parcel. |
public static final Parcelable.Creator<MidiLibrary.MidiFile> CREATOR
public MidiFile(Uri uri, String name, int duration, String artist, String album, String parentName, String path)
MidiFile object.uri - the Uri that can be used to open the filename - the file's nameduration - the duration (in milliseconds)artist - the file's artistalbum - the file's albumparentName - the fully-qualified name of the parent MidiLibrary.Folder, use null if there is no parentpublic int getDuration()
MidiFile.public String getArtist()
MidiFile.public String getAlbum()
MidiFile belongs to.public String getPath()
Stringpublic boolean hasChildren()
false.hasChildren in interface MidiLibrary.MapNodefalsepublic Set<MidiLibrary.MapNode> getChildren()
null.getChildren in interface MidiLibrary.MapNodenullpublic Set<MidiLibrary.MapNode> getChildrenRecursive()
null.getChildrenRecursive in interface MidiLibrary.MapNodenullMidiLibrary.Folder.getChildrenRecursive()public int getChildrenCount()
-1.getChildrenCount in interface MidiLibrary.MapNode-1public Set<String> getKeys()
null.getKeys in interface MidiLibrary.MapNodenullpublic Set<String> getKeysRecursive()
null.getKeysRecursive in interface MidiLibrary.MapNodenullpublic boolean isFile()
true.isFile in interface MidiLibrary.MapNodetruepublic String getName()
MidiFile.getName in interface MidiLibrary.MapNodepublic String getNameGlobal()
MidiFile.getNameGlobal in interface MidiLibrary.MapNodepublic String getParentName()
MidiFile's parent.getParentName in interface MidiLibrary.MapNodepublic MediaMetadataCompat getMetadata()
MidiFile.getMetadata in interface MidiLibrary.MapNodepublic int compareTo(MidiLibrary.MapNode node)
MidiFile with another MidiLibrary.MapNode and determines which should be sorted first. Case is ignored.compareTo in interface Comparable<MidiLibrary.MapNode>node - the MapNode to compare againstMidiFile should be sorted first, 0 if the objects should be sorted equally, or
a positive integer if node should be sorted firstpublic void writeToParcel(Parcel dest, int flags)
MidiFile to a Parcel.writeToParcel in interface Parcelabledest - the parcel to write toflags - the flags used for writingParcelable.writeToParcel(Parcel, int)public int describeContents()
0.describeContents in interface Parcelable0Parcelable.describeContents()