public class TLfnProgress extends Object
Modifier and Type | Field and Description |
---|---|
static TLfnProgress |
UNKNOWN
A constant representing unknown progress.
|
static long |
UNKNOWN_BOUND
Constant indicating the upper bound of a progress is unknown.
|
static long |
UNKNOWN_ELAPSED_TIME
Constant indicating the elapsed time is unknown.
|
static long |
UNKNOWN_START_TIME
Constant indicating the start time of a progress is unknown.
|
static long |
UNKNOWN_TIME_LEFT
Constant indicating the remaining time of a progress is unknown.
|
static long |
UNKNOWN_VALUE
Constant indicating the current value of a progress is unknown.
|
Constructor and Description |
---|
TLfnProgress(long aStartTime,
long aValue,
long aBound,
long aTimeLeft)
Deprecated.
Use
TLfnProgress(long, long, long, long, long) instead |
TLfnProgress(long aStartTime,
long aValue,
long aBound,
long aTimeLeft,
long aElapsedTime)
Constructs a new progress snapshot.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object aOther) |
long |
get()
Returns the current progress.
|
double |
getAsFraction()
Gets the current progress as a fraction in [0,1].
|
long |
getBound()
Gets the upper bound of the progress.
|
long |
getElapsedTime()
Gets the total elapsed time in milliseconds.
|
long |
getStartTime()
Returns the time (in milliseconds as defined by
System.currentTimeMillis() ) at which
the progress started. |
long |
getTimeLeft()
Returns the estimated time left (in milliseconds).
|
int |
hashCode() |
String |
toString() |
public static final long UNKNOWN_START_TIME
public static final long UNKNOWN_ELAPSED_TIME
public static final long UNKNOWN_TIME_LEFT
public static final long UNKNOWN_VALUE
public static final long UNKNOWN_BOUND
public static final TLfnProgress UNKNOWN
UNKNOWN_START_TIME
UNKNOWN_VALUE
UNKNOWN_BOUND
UNKNOWN_TIME_LEFT
@Deprecated public TLfnProgress(long aStartTime, long aValue, long aBound, long aTimeLeft)
TLfnProgress(long, long, long, long, long)
insteadaStartTime
- the time in milliseconds since epoch at which the progress started or UNKNOWN_START_TIME
when not startedaValue
- the current progress or UNKNOWN_VALUE
if unknownaBound
- the upper bound of the progress or UNKNOWN_BOUND
if unknownaTimeLeft
- the estimated time left in milliseconds or UNKNOWN_TIME_LEFT
when unknownpublic TLfnProgress(long aStartTime, long aValue, long aBound, long aTimeLeft, long aElapsedTime)
aStartTime
- the time in milliseconds since epoch at which the progress started or
UNKNOWN_START_TIME
if not startedaValue
- the current progress or UNKNOWN_VALUE
if unknownaBound
- the upper bound of the progress or UNKNOWN_BOUND
if unknownaTimeLeft
- the estimated time left in milliseconds or UNKNOWN_TIME_LEFT
if unknownaElapsedTime
- the elapsed time in milliseconds, or UNKNOWN_ELAPSED_TIME
if unknownpublic long get()
getBound()
], or UNKNOWN_VALUE
if unknown.UNKNOWN_VALUE
if unknownpublic long getBound()
UNKNOWN_BOUND
if unknownpublic double getAsFraction()
Double.NaN
if unknownpublic long getStartTime()
System.currentTimeMillis()
) at which
the progress started.
If the job was stopped and restarted multiple times, the time of the last restart will be reflected.UNKNOWN_START_TIME
if not startedpublic long getElapsedTime()
UNKNOWN_ELAPSED_TIME
if unknownpublic long getTimeLeft()
UNKNOWN_TIME_LEFT
if unknown