|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.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 null ed. |
TrackMetadataBean |
nullsEqualFields(TrackMetadataBean other,
boolean sensibleFieldsOnly)
Creates new bean having equal fields null ed. |
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 Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public int getFrequency()
public long getTrackId()
public TrackMetadataBean nullsEqualFields(TrackMetadataBean other)
null
ed.
other
- the other bean
null
ed.public TrackMetadataBean nullsEqualFields(TrackMetadataBean other, boolean sensibleFieldsOnly)
null
ed.
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.
null
ed.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 |