public static final class MatchedResource.Builder extends Object
MatchedResource.
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.
| Modifier and Type | Method and Description |
|---|---|
MatchedResource |
build()
Builds a new
MatchedResource. |
MatchedResource.Builder |
checksum(Checksum checksum)
Initializes the value for the
checksum attribute. |
MatchedResource.Builder |
from(MatchedResource instance)
Fill a builder with attribute values from the provided
MatchedResource instance. |
MatchedResource.Builder |
mode(String mode)
Initializes the value for the
mode attribute. |
MatchedResource.Builder |
path(String path)
Initializes the value for the
path attribute. |
MatchedResource.Builder |
size(Integer size)
Initializes the value for the
size attribute. |
public final MatchedResource.Builder from(MatchedResource instance)
MatchedResource 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 MatchedResource.Builder checksum(Checksum checksum)
checksum attribute.checksum - The value for checksum (can be null)this builder for use in a chained invocationpublic final MatchedResource.Builder mode(String mode)
mode attribute.mode - The value for mode (can be null)this builder for use in a chained invocationpublic final MatchedResource.Builder path(String path)
path attribute.path - The value for path (can be null)this builder for use in a chained invocationpublic final MatchedResource.Builder size(Integer size)
size attribute.size - The value for size (can be null)this builder for use in a chained invocationpublic MatchedResource build()
MatchedResource.IllegalStateException - if any required attributes are missingCopyright © 2024. All rights reserved.