public static class Work.Progress extends Object implements Serializable
Progress can be expressed as a percentage, or with a current and total count.
Modifier and Type | Field and Description |
---|---|
protected long |
current |
static long |
CURRENT_INDETERMINATE |
protected float |
percent |
static float |
PERCENT_INDETERMINATE |
static Work.Progress |
PROGRESS_0_PC |
static Work.Progress |
PROGRESS_100_PC |
static Work.Progress |
PROGRESS_INDETERMINATE |
protected long |
total |
Constructor and Description |
---|
Progress(float percent)
Constructs a
Work.Progress as a percentage. |
Progress(long current,
long total)
Constructs a
Work.Progress as a current and total count. |
Modifier and Type | Method and Description |
---|---|
long |
getCurrent() |
boolean |
getIsIndeterminate() |
boolean |
getIsWithCurrentAndTotal() |
boolean |
getIsWithPercent() |
float |
getPercent() |
long |
getTotal() |
String |
toString() |
public static long CURRENT_INDETERMINATE
public static float PERCENT_INDETERMINATE
public static final Work.Progress PROGRESS_INDETERMINATE
public static final Work.Progress PROGRESS_0_PC
public static final Work.Progress PROGRESS_100_PC
protected final float percent
protected final long current
protected final long total
public Progress(float percent)
Work.Progress
as a percentage.percent
- the percentage, a float between 0 and 100, or PERCENT_INDETERMINATE
public Progress(long current, long total)
Work.Progress
as a current and total count.current
- the current count or CURRENT_INDETERMINATE
total
- the total countpublic float getPercent()
public long getCurrent()
public long getTotal()
public boolean getIsWithPercent()
public boolean getIsWithCurrentAndTotal()
public boolean getIsIndeterminate()
Copyright © 2018 Nuxeo. All rights reserved.