Package com.io7m.brooklime.api
Class BLProgressUpdate.Builder
java.lang.Object
com.io7m.brooklime.api.BLProgressUpdate.Builder
- Enclosing class:
BLProgressUpdate
Builds instances of type
BLProgressUpdate.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newBLProgressUpdate.final BLProgressUpdate.Builderfrom(BLProgressEventType instance) Fill a builder with attribute values from the providedcom.io7m.brooklime.api.BLProgressEventTypeinstance.final BLProgressUpdate.Builderfrom(BLProgressEventType.BLProgressUpdateType instance) Fill a builder with attribute values from the providedcom.io7m.brooklime.api.BLProgressEventType.BLProgressUpdateTypeinstance.final BLProgressUpdate.BuildersetAttemptCurrent(int attemptCurrent) Initializes the value for theattemptCurrentattribute.final BLProgressUpdate.BuildersetAttemptMaximum(int attemptMaximum) Initializes the value for theattemptMaximumattribute.final BLProgressUpdate.BuildersetBytesMaximum(long bytesMaximum) Initializes the value for thebytesMaximumattribute.final BLProgressUpdate.BuildersetBytesPerSecond(long bytesPerSecond) Initializes the value for thebytesPerSecondattribute.final BLProgressUpdate.BuildersetBytesSent(long bytesSent) Initializes the value for thebytesSentattribute.final BLProgressUpdate.BuildersetFileIndexCurrent(int fileIndexCurrent) Initializes the value for thefileIndexCurrentattribute.final BLProgressUpdate.BuildersetFileIndexMaximum(int fileIndexMaximum) Initializes the value for thefileIndexMaximumattribute.final BLProgressUpdate.BuilderInitializes the value for thenameattribute.final BLProgressUpdate.BuildersetProgress(double progress) Initializes the value for theprogressattribute.final BLProgressUpdate.BuildersetTimeRemaining(Duration timeRemaining) Initializes the value for thetimeRemainingattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedcom.io7m.brooklime.api.BLProgressEventType.BLProgressUpdateTypeinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.io7m.brooklime.api.BLProgressEventTypeinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setName
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
setFileIndexCurrent
Initializes the value for thefileIndexCurrentattribute.- Parameters:
fileIndexCurrent- The value for fileIndexCurrent- Returns:
thisbuilder for use in a chained invocation
-
setFileIndexMaximum
Initializes the value for thefileIndexMaximumattribute.- Parameters:
fileIndexMaximum- The value for fileIndexMaximum- Returns:
thisbuilder for use in a chained invocation
-
setAttemptCurrent
Initializes the value for theattemptCurrentattribute.- Parameters:
attemptCurrent- The value for attemptCurrent- Returns:
thisbuilder for use in a chained invocation
-
setAttemptMaximum
Initializes the value for theattemptMaximumattribute.- Parameters:
attemptMaximum- The value for attemptMaximum- Returns:
thisbuilder for use in a chained invocation
-
setBytesSent
Initializes the value for thebytesSentattribute.- Parameters:
bytesSent- The value for bytesSent- Returns:
thisbuilder for use in a chained invocation
-
setBytesMaximum
Initializes the value for thebytesMaximumattribute.- Parameters:
bytesMaximum- The value for bytesMaximum- Returns:
thisbuilder for use in a chained invocation
-
setProgress
Initializes the value for theprogressattribute.- Parameters:
progress- The value for progress- Returns:
thisbuilder for use in a chained invocation
-
setBytesPerSecond
Initializes the value for thebytesPerSecondattribute.- Parameters:
bytesPerSecond- The value for bytesPerSecond- Returns:
thisbuilder for use in a chained invocation
-
setTimeRemaining
Initializes the value for thetimeRemainingattribute.- Parameters:
timeRemaining- The value for timeRemaining- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newBLProgressUpdate.- Returns:
- An immutable instance of BLProgressUpdate
- Throws:
IllegalStateException- if any required attributes are missing
-