public static class ByteRange.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
ByteRange |
build()
Builds a new
ByteRange. |
ByteRange.Builder |
from(ByteRange instance)
Fill a builder with attribute values from the provided
ByteRange instance. |
ByteRange.Builder |
length(long length)
Initializes the value for the
length attribute. |
ByteRange.Builder |
offset(long offset)
Initializes the optional value
offset to offset. |
ByteRange.Builder |
offset(java.util.Optional<java.lang.Long> offset)
Initializes the optional value
offset to offset. |
public final ByteRange.Builder from(ByteRange instance)
ByteRange instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ByteRange.Builder length(long length)
length attribute.length - The value for lengththis builder for use in a chained invocationpublic final ByteRange.Builder offset(long offset)
offset to offset.offset - The value for offsetthis builder for chained invocationpublic final ByteRange.Builder offset(java.util.Optional<java.lang.Long> offset)
offset to offset.offset - The value for offsetthis builder for use in a chained invocation