|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.baka.ambient.collection.TrackMetadataBean
public final class TrackMetadataBean
Contains metadata about a track. Immutable, thread-safe.
| Nested Class Summary | |
|---|---|
static class |
TrackMetadataBean.Builder
The mutable version of TrackMetadataBean. |
| Field Summary | |
|---|---|
static TrackMetadataBean |
EMPTY
An empty bean. |
| Method Summary | |
|---|---|
static void |
appendDisplayableLength(int length,
StringBuilder builder,
boolean emptyStringOnZero)
Appends length in the [hh:]mm:ss format. |
boolean |
equals(Object o)
|
String |
getAlbum()
Album name. |
String |
getArtist()
Artist name. |
String |
getArtistDesc()
The artist's description. |
String |
getArtistURL()
A link to artist's page |
int |
getBitrate()
Bitrate in kbps. |
String |
getBuyURL()
You can buy the album here |
String |
getComposer()
Original composer. |
String |
getDisplayableLength()
Returns length in the [hh:]mm:ss format. |
static String |
getDisplayableLength(int length)
Returns length in the [hh:]mm:ss format. |
String |
getDisplayableName()
Returns the name of the track. |
long |
getFileSize()
File size in bytes. |
int |
getFrequency()
Frequency in hz. |
String |
getGenre()
Genre. |
int |
getLength()
Length in seconds. |
String |
getLicense()
The license URL |
String |
getLocation()
Location on the filesystem. |
TrackOriginEnum |
getOrigin()
The track origin. |
String |
getTitle()
|
long |
getTrackId()
Database track id. |
String |
getTrackNumber()
|
String |
getYearReleased()
The year released. |
int |
hashCode()
|
boolean |
isLocal()
Checks if the track denoted by this object is a local one (you can pass getLocation() to a File object) , or an Internet stream
(getLocation() is valid URL). |
static TrackMetadataBean.Builder |
newBuilder()
Returns new track metadata builder instance. |
TrackMetadataBean |
nullsEqualFields(TrackMetadataBean other)
Creates new bean having equal fields nulled. |
TrackMetadataBean |
nullsEqualFields(TrackMetadataBean other,
boolean sensibleFieldsOnly)
Creates new bean having equal fields nulled. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final TrackMetadataBean EMPTY
| Method Detail |
|---|
public final String getDisplayableName()
getTitle() unless it's
null - in this case returns the file name.
null.public static String getDisplayableLength(int length)
[hh:]mm:ss format.
length - the length in seconds
public static void appendDisplayableLength(int length,
StringBuilder builder,
boolean emptyStringOnZero)
[hh:]mm:ss format.
length - the length in secondsbuilder - append the time here.emptyStringOnZero - if true then empty string is returned on zero.public String getDisplayableLength()
[hh:]mm:ss format.
public String getAlbum()
public String getArtist()
public int getBitrate()
public String getComposer()
public long getFileSize()
public String getYearReleased()
public String getGenre()
public int getLength()
public String getLocation()
public boolean isLocal()
getLocation() to a File object) , or an Internet stream
(getLocation() is valid URL).
true if the file is local.public String getTitle()
public String getTrackNumber()
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic int getFrequency()
public long getTrackId()
public TrackMetadataBean nullsEqualFields(TrackMetadataBean other)
nulled.
other - the other bean
nulled.
public TrackMetadataBean nullsEqualFields(TrackMetadataBean other,
boolean sensibleFieldsOnly)
nulled.
other - the other beansensibleFieldsOnly - if true then only sensible fields are compared -
i.e. the bitrate, fileSize,
frequency, length, title and
trackNumber are not nulled even when equal.
nulled.public TrackOriginEnum getOrigin()
null.public String getBuyURL()
public String getLicense()
public String getArtistURL()
public String getArtistDesc()
public static TrackMetadataBean.Builder newBuilder()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||