public abstract class Progress
extends java.lang.Object
Progress objects are immutable.
To create a new instance, use one of the static constructors on this class.
Modifier and Type | Method and Description |
---|---|
static Progress |
completed()
Get a static progress object that is complete.
|
abstract double |
getProgress()
Get the progress percentage.
|
static Progress |
indeterminate()
Get a static progress object that is indeterminate.
|
abstract boolean |
isIndeterminate()
Return whether the current progress is indeterminate.
|
static Progress |
of(double value)
Create a new progress object with the given percentage.
|
static Progress |
split(java.util.Collection<Progress> progress)
Create a new progress object with progress split equally between the
given progress objects.
|
static Progress |
split(Progress... objects)
Create a new progress object with progress split equally between the
given progress objects.
|
static Progress |
splitObservables(java.util.Collection<? extends ProgressObservable> observables)
Create a new progress object with progress split equally between the
given
ProgressObservable s. |
static Progress |
splitObservables(ProgressObservable... observables)
Create a new progress object with progress split equally between the
given
ProgressObservable s. |
public abstract boolean isIndeterminate()
public abstract double getProgress()
If isIndeterminate()
returns true
, the behavior
of this method is undefined.
public static Progress indeterminate()
public static Progress completed()
public static Progress of(double value)
value
- the percentage, which will be clamped to [0, 1]public static Progress split(Progress... objects)
objects
- an array of progress objectspublic static Progress split(java.util.Collection<Progress> progress)
progress
- a collection of progress objectspublic static Progress splitObservables(ProgressObservable... observables)
ProgressObservable
s.observables
- an array of observablespublic static Progress splitObservables(java.util.Collection<? extends ProgressObservable> observables)
ProgressObservable
s.observables
- a collection of observables