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()
String
public boolean hasChildren()
false
.hasChildren
in interface MidiLibrary.MapNode
false
public Set<MidiLibrary.MapNode> getChildren()
null
.getChildren
in interface MidiLibrary.MapNode
null
public Set<MidiLibrary.MapNode> getChildrenRecursive()
null
.getChildrenRecursive
in interface MidiLibrary.MapNode
null
MidiLibrary.Folder.getChildrenRecursive()
public int getChildrenCount()
-1
.getChildrenCount
in interface MidiLibrary.MapNode
-1
public Set<String> getKeys()
null
.getKeys
in interface MidiLibrary.MapNode
null
public Set<String> getKeysRecursive()
null
.getKeysRecursive
in interface MidiLibrary.MapNode
null
public boolean isFile()
true
.isFile
in interface MidiLibrary.MapNode
true
public String getName()
MidiFile
.getName
in interface MidiLibrary.MapNode
public String getNameGlobal()
MidiFile
.getNameGlobal
in interface MidiLibrary.MapNode
public String getParentName()
MidiFile
's parent.getParentName
in interface MidiLibrary.MapNode
public MediaMetadataCompat getMetadata()
MidiFile
.getMetadata
in interface MidiLibrary.MapNode
public 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 Parcelable
dest
- the parcel to write toflags
- the flags used for writingParcelable.writeToParcel(Parcel, int)
public int describeContents()
0
.describeContents
in interface Parcelable
0
Parcelable.describeContents()