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.BuilderaddAllExtraTags(java.lang.Iterable<java.lang.String> elements)Adds elements toextraTagsset.ASFilenameMetadata.BuilderaddExtraTags(java.lang.String element)Adds one element toextraTagsset.ASFilenameMetadata.BuilderaddExtraTags(java.lang.String... elements)Adds elements toextraTagsset.ASFilenameMetadatabuild()Builds a newASFilenameMetadata.ASFilenameMetadata.Builderfrom(ASFilenameMetadataType instance)Fill a builder with attribute values from the providedASFilenameMetadataTypeinstance.ASFilenameMetadata.BuildersetArchitecture(java.lang.String architecture)Initializes the value for thearchitectureattribute.ASFilenameMetadata.BuildersetBuild(RuntimeBuild build)Initializes the optional valuebuildto build.ASFilenameMetadata.BuildersetBuild(java.util.Optional<? extends RuntimeBuild> build)Initializes the optional valuebuildto build.ASFilenameMetadata.BuildersetExtraTags(java.lang.Iterable<java.lang.String> elements)Sets or replaces all elements forextraTagsset.ASFilenameMetadata.BuildersetPlatform(java.lang.String platform)Initializes the value for theplatformattribute.ASFilenameMetadata.BuildersetVersion(RuntimeVersion version)Initializes the value for theversionattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedASFilenameMetadataTypeinstance. 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:
thisbuilder for use in a chained invocation
-
setVersion
Initializes the value for theversionattribute.- Parameters:
version- The value for version- Returns:
thisbuilder for use in a chained invocation
-
setArchitecture
Initializes the value for thearchitectureattribute.- Parameters:
architecture- The value for architecture- Returns:
thisbuilder for use in a chained invocation
-
setPlatform
Initializes the value for theplatformattribute.- Parameters:
platform- The value for platform- Returns:
thisbuilder for use in a chained invocation
-
setBuild
Initializes the optional valuebuildto build.- Parameters:
build- The value for build- Returns:
thisbuilder for chained invocation
-
setBuild
Initializes the optional valuebuildto build.- Parameters:
build- The value for build- Returns:
thisbuilder for use in a chained invocation
-
addExtraTags
Adds one element toextraTagsset.- Parameters:
element- A extraTags element- Returns:
thisbuilder for use in a chained invocation
-
addExtraTags
Adds elements toextraTagsset.- Parameters:
elements- An array of extraTags elements- Returns:
thisbuilder for use in a chained invocation
-
setExtraTags
public final ASFilenameMetadata.Builder setExtraTags(java.lang.Iterable<java.lang.String> elements)Sets or replaces all elements forextraTagsset.- Parameters:
elements- An iterable of extraTags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllExtraTags
public final ASFilenameMetadata.Builder addAllExtraTags(java.lang.Iterable<java.lang.String> elements)Adds elements toextraTagsset.- Parameters:
elements- An iterable of extraTags elements- Returns:
thisbuilder 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
-