T - the type of the optional user objectpublic class MutableCompletableActivityBase<T> extends CompletableActivityBase<T> implements MutableCompletableActivity
percentageCompleteDEFAULT_DURATION, endTime, id, name, startTime, userObject| Constructor and Description |
|---|
MutableCompletableActivityBase()
Constructs a new mutable activity.
|
MutableCompletableActivityBase(Instant startTime,
Instant endTime)
Constructs a new mutable activity with the start time and end time.
|
MutableCompletableActivityBase(String name)
Constructs a new mutable activity with the given name.
|
MutableCompletableActivityBase(String name,
Instant startTime,
Instant endTime)
Constructs a new mutable activity with the given name, start time, and
end time.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDuration(Duration duration)
Convenience method to determine a new end time based on a duration that
will be added once to the current end time of the activity.
|
void |
addDuration(Duration duration,
long multipliedBy)
Convenience method to determine a new end time based on a duration that
will be added several times to the current end time of the activity.
|
Duration |
getDuration()
Convenience method to determine the duration between the start and the
end time of the activity.
|
void |
setDuration(Duration duration)
Convenience method to determine a new end time based on a duration that
will be added to the current start time of the activity.
|
void |
setEndTime(Instant time)
Sets a new end time on the activity.
|
void |
setId(String id)
Sets the ID field on the activity.
|
void |
setName(String name)
Sets the name of the activity.
|
void |
setPercentageComplete(double complete)
Returns the percentage complete value of the activity.
|
void |
setStartTime(Instant time)
Sets a new start time on the activity.
|
void |
setUserObject(T userObject) |
getPercentageComplete, toStringgetEndTime, getId, getName, getStartTime, getUserObjectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetPercentageCompletegetEndTime, getId, getName, getStartTimepublic MutableCompletableActivityBase()
Instant.now() and the end time will be equal to
Instant.now() plus the value of ActivityBase.DEFAULT_DURATION.public MutableCompletableActivityBase(String name)
Instant.now() and the end time will be equal
to Instant.now() plus the value of ActivityBase.DEFAULT_DURATION.name - the name of the activitypublic MutableCompletableActivityBase(Instant startTime, Instant endTime)
startTime - the start time of the activityendTime - the end time of the activitypublic MutableCompletableActivityBase(String name, Instant startTime, Instant endTime)
name - the name of the activitystartTime - the start time of the activityendTime - the end time of the activitypublic void setId(String id)
MutableActivityUUID. Only change it if your application uses its own ID
system.setId in interface MutableActivityid - the new ID of the activitypublic void setName(String name)
MutableActivitysetName in interface MutableActivityname - the new name of the activitypublic void setUserObject(T userObject)
public void setStartTime(Instant time)
MutableActivitysetStartTime in interface MutableActivitytime - the new start timepublic void setEndTime(Instant time)
MutableActivitysetEndTime in interface MutableActivitytime - the new end timepublic void setDuration(Duration duration)
duration - the duration of the activitypublic Duration getDuration()
public void addDuration(Duration duration)
duration - the duration of the activitypublic void addDuration(Duration duration, long multipliedBy)
duration - the duration of the activitymultipliedBy - the number of times that the duration will be addedpublic void setPercentageComplete(double complete)
MutableCompletableActivitysetPercentageComplete in interface MutableCompletableActivitycomplete - the new percentage complete value (must be between 0 and 100).Copyright © 2014 Dirk Lemmermann Software & Consulting. All rights reserved.