|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--playcontrol.Song
Objects of this class represent playlist items, songs. A song has an id unique in its playlist, and other song information (title, album, length etc.). There can be several constructors for different information sources. Song information can be queried after a datum name, or in predefined formats.
| Field Summary | |
static int |
debug
|
protected java.util.Map |
info
Song info mapping from datum names to String values. |
protected java.lang.String |
np3id
|
protected java.lang.String |
np3string
|
static java.lang.String |
rcsid
|
| Constructor Summary | |
protected |
Song()
Instances are created using static methods. |
| Method Summary | |
static void |
dbg(java.lang.String msg)
|
static java.lang.String |
formatTime(int milliseconds)
Formats the specified time as a string. |
static Song |
fromNp3(java.lang.String np3id,
java.lang.String np3string,
java.lang.String time)
Gives Song object for Np3 playlist item. |
java.lang.String |
getId()
Returns the id of this song. |
java.lang.String |
getInfo(java.lang.String name)
Returns the specified song info datum |
boolean |
hasInfoData()
Tests whether this song has song info. |
static void |
info(java.lang.String msg)
|
java.lang.String |
infoString(java.lang.String prefix,
java.lang.String name,
java.lang.String suffix)
Formats song info value as a string. |
java.lang.String |
inPlaylist()
Formats info of this song for playlist. |
java.lang.String |
timeString(java.lang.String prefix,
java.lang.String suffix)
Formats song length time as a string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String rcsid
public static int debug
protected java.lang.String np3id
protected java.lang.String np3string
protected java.util.Map info
If datum is null, it is not set (probably because
it wasn't available for this filetype).
If datum is "", it is unknown (probably because it wasn't available for this file).
| name | value |
|---|---|
| Song | song title |
| Track | track number |
| Time | length in milliseconds |
| Year | year (of publication) |
| Constructor Detail |
protected Song()
| Method Detail |
public static void dbg(java.lang.String msg)
public static void info(java.lang.String msg)
public static Song fromNp3(java.lang.String np3id,
java.lang.String np3string,
java.lang.String time)
np3id - the id unique for this playlist entrynp3string - info string sent by np3time - length of this song in seconds
public java.lang.String getId()
public java.lang.String getInfo(java.lang.String name)
name - a song info datum name
null if not availablepublic boolean hasInfoData()
public java.lang.String inPlaylist()
public java.lang.String infoString(java.lang.String prefix,
java.lang.String name,
java.lang.String suffix)
prefix - text added before datumname - name of the info datumsuffix - text added after datum
public java.lang.String timeString(java.lang.String prefix,
java.lang.String suffix)
prefix - text added before timesuffix - text added after time
public static java.lang.String formatTime(int milliseconds)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||