|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.syndication.feed.module.itunes.types.Duration
public class Duration
An encapsulation of the duration of a podcast. This will serialize (via .toString()) to HH:MM:SS format, and can parse [H]*H:[M]*M:[S]*S or [M]*M:[S]*S.
Constructor Summary | |
---|---|
Duration()
Creates a new Duration object with 0 length. |
|
Duration(int hours,
int minutes,
float seconds)
Creates a new duration object with the given hours, minutes and seconds |
|
Duration(long milliseconds)
Creates a new instance of Duration specifying a length in milliseconds |
|
Duration(java.lang.String duration)
Creates a new Duration parsing the String value. |
Method Summary | |
---|---|
long |
getMilliseconds()
Returns the millisecond length |
void |
setMilliseconds(long milliseconds)
Sets the millisecond length |
java.lang.String |
toString()
Returns a String representation in the formation HH:MM:SS |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Duration()
public Duration(long milliseconds)
milliseconds
- Creates a new instance of Duration specifying a length in millisecondspublic Duration(int hours, int minutes, float seconds)
hours
- number of hoursminutes
- number of minutesseconds
- number of secondspublic Duration(java.lang.String duration)
duration
- A String to parseMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public long getMilliseconds()
public void setMilliseconds(long milliseconds)
milliseconds
- the millisecond length
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |