Logo Search packages:      
Sourcecode: uimaj version File versions  Download package

Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

org::apache::uima::internal::util::TimeSpan Class Reference

List of all members.

Public Member Functions

int getDays ()
long getFullMilliseconds ()
int getHours ()
int getMilliseconds ()
int getMinutes ()
int getSeconds ()
int getYears ()
boolean isInstantiated ()
boolean setDays (int days)
boolean setFullMilliseconds (long milliseconds)
boolean setHours (int hours)
boolean setMilliseconds (int milliseconds)
boolean setMinutes (int minutes)
boolean setSeconds (int seconds)
boolean setYears (int years)
 TimeSpan ()
 TimeSpan (long milliseconds)
String toString ()

Private Member Functions

void ensureAll ()
void ensureFull ()

Private Attributes

long all
int days
int hours
boolean knowsFull = false
boolean knowsMS = false
int milliseconds
int minutes
int seconds
int years

Static Private Attributes

static final String daysString = "days"
static final String hoursString = "hrs"
static final String minutesString = "min"
static final long msDay = msHour * 24
static final long msHour = msMinute * 60
static final long msMinute = msSecond * 60
static final long msSecond = 1000
static final String msString = "ms"
static final long msYear = msDay * 365
static final String secondsString = "sec"
static final String unknownTime = "unknown"
static final String yearsString = "yrs"

Detailed Description

Encode a span of time. The main purpose of this class is to provide a printing utility for time spans. E.g., 1081 ms should be printed as 1.081 s, 108101 ms should be printed as 1 min 48.101 s, etc.

Note that the largest value you can represent with this class is 9223372036854775807 (Long.MAX_VALUE), or equivalently, 292471208 yrs 247 days 7 hrs 12 min 55.807 sec. Overflow is not handled gracefully by this class.

Also note that for the purposes of this class, a year has 365 days. I.e., a year corresponds to 365 * 24 * 60 * 60 * 1000 ms.

Definition at line 36 of file TimeSpan.java.


The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index