Class ASFilenameMetadata.Builder
java.lang.Object
com.io7m.coffeepick.shipilev_net.internal.ASFilenameMetadata.Builder
- Enclosing class:
- ASFilenameMetadata
public static final class ASFilenameMetadata.Builder
extends java.lang.Object
Builds instances of type
ASFilenameMetadata
.
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 Type Method Description ASFilenameMetadata.Builder
addAllExtraTags(java.lang.Iterable<java.lang.String> elements)
Adds elements toextraTags
set.ASFilenameMetadata.Builder
addExtraTags(java.lang.String element)
Adds one element toextraTags
set.ASFilenameMetadata.Builder
addExtraTags(java.lang.String... elements)
Adds elements toextraTags
set.ASFilenameMetadata
build()
Builds a newASFilenameMetadata
.ASFilenameMetadata.Builder
from(ASFilenameMetadataType instance)
Fill a builder with attribute values from the providedASFilenameMetadataType
instance.ASFilenameMetadata.Builder
setArchitecture(java.lang.String architecture)
Initializes the value for thearchitecture
attribute.ASFilenameMetadata.Builder
setBuild(RuntimeBuild build)
Initializes the optional valuebuild
to build.ASFilenameMetadata.Builder
setBuild(java.util.Optional<? extends RuntimeBuild> build)
Initializes the optional valuebuild
to build.ASFilenameMetadata.Builder
setExtraTags(java.lang.Iterable<java.lang.String> elements)
Sets or replaces all elements forextraTags
set.ASFilenameMetadata.Builder
setPlatform(java.lang.String platform)
Initializes the value for theplatform
attribute.ASFilenameMetadata.Builder
setVersion(RuntimeVersion version)
Initializes the value for theversion
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedASFilenameMetadataType
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
setVersion
Initializes the value for theversion
attribute.- Parameters:
version
- The value for version- Returns:
this
builder for use in a chained invocation
-
setArchitecture
Initializes the value for thearchitecture
attribute.- Parameters:
architecture
- The value for architecture- Returns:
this
builder for use in a chained invocation
-
setPlatform
Initializes the value for theplatform
attribute.- Parameters:
platform
- The value for platform- Returns:
this
builder for use in a chained invocation
-
setBuild
Initializes the optional valuebuild
to build.- Parameters:
build
- The value for build- Returns:
this
builder for chained invocation
-
setBuild
Initializes the optional valuebuild
to build.- Parameters:
build
- The value for build- Returns:
this
builder for use in a chained invocation
-
addExtraTags
Adds one element toextraTags
set.- Parameters:
element
- A extraTags element- Returns:
this
builder for use in a chained invocation
-
addExtraTags
Adds elements toextraTags
set.- Parameters:
elements
- An array of extraTags elements- Returns:
this
builder for use in a chained invocation
-
setExtraTags
public final ASFilenameMetadata.Builder setExtraTags(java.lang.Iterable<java.lang.String> elements)Sets or replaces all elements forextraTags
set.- Parameters:
elements
- An iterable of extraTags elements- Returns:
this
builder for use in a chained invocation
-
addAllExtraTags
public final ASFilenameMetadata.Builder addAllExtraTags(java.lang.Iterable<java.lang.String> elements)Adds elements toextraTags
set.- Parameters:
elements
- An iterable of extraTags elements- Returns:
this
builder for use in a chained invocation
-
build
Builds a newASFilenameMetadata
.- Returns:
- An immutable instance of ASFilenameMetadata
- Throws:
java.lang.IllegalStateException
- if any required attributes are missing
-