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


Variable Index

 o SID
 o SIF
 o SIH
 o SIM
 o SIMTH
 o SIQ
 o SIS
 o SIW
 o SIY

Constructor Index

 o Duration()
 o Duration(long)
Constructs a new time with the specified duration in milliseconds

Method Index

 o add(Duration)
 o addMultiple(Duration, int)
Adds the supplied duration number times
 o Clone()
 o getHours()
 o getTime()
 o loadFrom(DataInput)
 o parse(String)
Given a string that represents a duration, parse it into a value that can be used to construct a Duration.
 o setTime(long)
 o subtract(Duration)
 o toShortString()
Return short version of time (ETB)
 o toShortString(long)
 o toString()
This routine courtesy of Adam Teague (brann)
 o toString(long, boolean)
 o toTruncString()
 o writeTo(DataOutput)

Variables

 o SIS
 public static final long SIS
 o SIM
 public static final long SIM
 o SIH
 public static final long SIH
 o SID
 public static final long SID
 o SIW
 public static final long SIW
 o SIF
 public static final long SIF
 o SIMTH
 public static final long SIMTH
 o SIQ
 public static final long SIQ
 o SIY
 public static final long SIY

Constructors

 o Duration
 public Duration()
 o Duration
 public Duration(long duration)
Constructs a new time with the specified duration in milliseconds

Methods

 o Clone
 public Object Clone()
 o getTime
 public long getTime()
 o getHours
 public final long getHours()
 o setTime
 public void setTime(long duration)
 o add
 public void add(Duration d)
 o addMultiple
 public void addMultiple(Duration d,
                         int number)
Adds the supplied duration number times

 o subtract
 public void subtract(Duration d)
 o loadFrom
 public void loadFrom(DataInput from) throws IOException
 o writeTo
 public void writeTo(DataOutput to) throws IOException
 o 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!

 o toShortString
 public String toShortString()
Return short version of time (ETB)

 o toShortString
 public static String toShortString(long milliseconds)
 o toString
 public String toString()
This routine courtesy of Adam Teague (brann)

Overrides:
toString in class Object
 o toTruncString
 public String toTruncString()
 o toString
 public static String toString(long milliseconds,
                               boolean shrt)

All Packages  Class Hierarchy  This Package  Previous  Next  Index