All Packages Class Hierarchy This Package Previous Next Index
Class key.Duration
java.lang.Object
|
+----key.Duration
- public final class Duration
- extends Object
- implements Storable
Represents an amount of time, such as 4 hours, or
3 days, or whatever
-
SID
-
-
SIF
-
-
SIH
-
-
SIM
-
-
SIMTH
-
-
SIQ
-
-
SIS
-
-
SIW
-
-
SIY
-
-
Duration()
-
-
Duration(long)
- Constructs a new time with the specified duration
in milliseconds
-
add(Duration)
-
-
addMultiple(Duration, int)
- Adds the supplied duration number times
-
Clone()
-
-
getHours()
-
-
getTime()
-
-
loadFrom(DataInput)
-
-
parse(String)
- Given a string that represents a duration, parse it into a
value that can be used to construct a Duration.
-
setTime(long)
-
-
subtract(Duration)
-
-
toShortString()
- Return short version of time (ETB)
-
toShortString(long)
-
-
toString()
- This routine courtesy of Adam Teague (brann)
-
toString(long, boolean)
-
-
toTruncString()
-
-
writeTo(DataOutput)
-
SIS
public static final long SIS
SIM
public static final long SIM
SIH
public static final long SIH
SID
public static final long SID
SIW
public static final long SIW
SIF
public static final long SIF
SIMTH
public static final long SIMTH
SIQ
public static final long SIQ
SIY
public static final long SIY
Duration
public Duration()
Duration
public Duration(long duration)
- Constructs a new time with the specified duration
in milliseconds
Clone
public Object Clone()
getTime
public long getTime()
getHours
public final long getHours()
setTime
public void setTime(long duration)
add
public void add(Duration d)
addMultiple
public void addMultiple(Duration d,
int number)
- Adds the supplied duration number times
subtract
public void subtract(Duration d)
loadFrom
public void loadFrom(DataInput from) throws IOException
writeTo
public void writeTo(DataOutput to) throws IOException
parse
public static long parse(String s) throws NumberFormatException
- Given a string that represents a duration, parse it into a
value that can be used to construct a Duration. (Don't
tell anyone, but it returns the duration in milliseconds).
At the moment, this routine only accepts values in seconds,
so nyah!
toShortString
public String toShortString()
- Return short version of time (ETB)
toShortString
public static String toShortString(long milliseconds)
toString
public String toString()
- This routine courtesy of Adam Teague (brann)
- Overrides:
- toString in class Object
toTruncString
public String toTruncString()
toString
public static String toString(long milliseconds,
boolean shrt)
All Packages Class Hierarchy This Package Previous Next Index