|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bramosystems.oss.player.core.client.PlayTime
public final class PlayTime
Utility class with methods to manipulate playback time.
| Constructor Summary | |
|---|---|
PlayTime()
Creates a PlayTime object |
|
PlayTime(double milliseconds)
Creates a PlayTime object set to the specified milliseconds |
|
PlayTime(int hour,
int minute,
int second,
int fract)
Creates a PlayTime object set to the specified time |
|
PlayTime(String time)
Creates a PlayTime object set to the specified time. |
|
| Method Summary | |
|---|---|
PlayTime |
add(int milliseconds)
Adds millseconds to the current play time |
int |
compareTo(PlayTime o)
|
boolean |
equals(Object obj)
|
int |
getFract()
Returns the hundredths of a second represented by this PlayTime object |
int |
getHour()
Returns the hour represented by this PlayTime object |
int |
getMinute()
Returns the minute represented by this PlayTime object |
int |
getSecond()
Returns the seconds represented by this PlayTime object |
double |
getTime()
Returns the current PlayTime in milliseconds |
int |
hashCode()
|
PlayTime |
reduce(int milliseconds)
Reduces the current play time by millseconds |
void |
setFract(int fract)
Sets the hundredths of a second of this PlayTime object |
void |
setHour(int hour)
Sets the hour of this PlayTime object |
void |
setMinute(int minute)
Sets the minute of this PlayTime object |
void |
setSecond(int second)
Sets the seconds of this PlayTime object |
String |
toString()
Returns the string representation of this object in full-format |
String |
toString(boolean fullFormat)
Returns the string representation of this object |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PlayTime()
public PlayTime(int hour,
int minute,
int second,
int fract)
hour - the hourminute - the minutesecond - the secondsfract - the hundredths of a secondpublic PlayTime(double milliseconds)
milliseconds - time in millisecondspublic PlayTime(String time)
time should be in the format hour:min:sec.fract. hour
and fract may be omitted unless required.
time - the time| Method Detail |
|---|
public PlayTime add(int milliseconds)
millseconds to the current play time
milliseconds - the milliseconds to add
public PlayTime reduce(int milliseconds)
millseconds
milliseconds - the milliseconds to reduce
public double getTime()
public int getHour()
public void setHour(int hour)
hour - the hourpublic int getMinute()
public void setMinute(int minute)
minute - the minutepublic int getSecond()
public void setSecond(int second)
second - the secondspublic int getFract()
public void setFract(int fract)
fract - the hundredths of a secondpublic String toString()
toString in class ObjecttoString(boolean)public String toString(boolean fullFormat)
The string representation is either in its full format (i.e. 00:00:00.000) or in the
short form. The short form excludes the hour (if hour is less than 1) and hundredths parts.
fullFormat - true to represent this object in the full format, false otherwise
public int compareTo(PlayTime o)
compareTo in interface Comparable<PlayTime>public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||