Package com.io7m.coffeepick.runtime
Class RuntimeRepositoryDescription.Builder
- java.lang.Object
-
- com.io7m.coffeepick.runtime.RuntimeRepositoryDescription.Builder
-
- Enclosing class:
- RuntimeRepositoryDescription
public static final class RuntimeRepositoryDescription.Builder extends java.lang.ObjectBuilds instances of typeRuntimeRepositoryDescription. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RuntimeRepositoryDescriptionbuild()Builds a newRuntimeRepositoryDescription.RuntimeRepositoryDescription.Builderfrom(RuntimeRepositoryDescriptionType instance)Fill a builder with attribute values from the providedRuntimeRepositoryDescriptionTypeinstance.RuntimeRepositoryDescription.BuilderputAllRuntimes(java.util.Map<java.lang.String,? extends RuntimeDescription> entries)Put all mappings from the specified map as entries toruntimesmap.RuntimeRepositoryDescription.BuilderputRuntimes(java.lang.String key, RuntimeDescription value)Put one entry to theruntimesmap.RuntimeRepositoryDescription.BuilderputRuntimes(java.util.Map.Entry<java.lang.String,? extends RuntimeDescription> entry)Put one entry to theruntimesmap.RuntimeRepositoryDescription.BuildersetBranding(RuntimeRepositoryBranding branding)Initializes the value for thebrandingattribute.RuntimeRepositoryDescription.BuildersetId(java.net.URI id)Initializes the value for theidattribute.RuntimeRepositoryDescription.BuildersetRuntimes(java.util.Map<java.lang.String,? extends RuntimeDescription> entries)Sets or replaces all mappings from the specified map as entries for theruntimesmap.RuntimeRepositoryDescription.BuildersetUpdated(java.time.OffsetDateTime updated)Initializes the optional valueupdatedto updated.RuntimeRepositoryDescription.BuildersetUpdated(java.util.Optional<? extends java.time.OffsetDateTime> updated)Initializes the optional valueupdatedto updated.
-
-
-
Method Detail
-
from
public final RuntimeRepositoryDescription.Builder from(RuntimeRepositoryDescriptionType instance)
Fill a builder with attribute values from the providedRuntimeRepositoryDescriptionTypeinstance. 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
-
setId
public final RuntimeRepositoryDescription.Builder setId(java.net.URI id)
Initializes the value for theidattribute.- Parameters:
id- The value for id- Returns:
thisbuilder for use in a chained invocation
-
setUpdated
public final RuntimeRepositoryDescription.Builder setUpdated(java.time.OffsetDateTime updated)
Initializes the optional valueupdatedto updated.- Parameters:
updated- The value for updated- Returns:
thisbuilder for chained invocation
-
setUpdated
public final RuntimeRepositoryDescription.Builder setUpdated(java.util.Optional<? extends java.time.OffsetDateTime> updated)
Initializes the optional valueupdatedto updated.- Parameters:
updated- The value for updated- Returns:
thisbuilder for use in a chained invocation
-
putRuntimes
public final RuntimeRepositoryDescription.Builder putRuntimes(java.lang.String key, RuntimeDescription value)
Put one entry to theruntimesmap.- Parameters:
key- The key in the runtimes mapvalue- The associated value in the runtimes map- Returns:
thisbuilder for use in a chained invocation
-
putRuntimes
public final RuntimeRepositoryDescription.Builder putRuntimes(java.util.Map.Entry<java.lang.String,? extends RuntimeDescription> entry)
Put one entry to theruntimesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
setRuntimes
public final RuntimeRepositoryDescription.Builder setRuntimes(java.util.Map<java.lang.String,? extends RuntimeDescription> entries)
Sets or replaces all mappings from the specified map as entries for theruntimesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the runtimes map- Returns:
thisbuilder for use in a chained invocation
-
putAllRuntimes
public final RuntimeRepositoryDescription.Builder putAllRuntimes(java.util.Map<java.lang.String,? extends RuntimeDescription> entries)
Put all mappings from the specified map as entries toruntimesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the runtimes map- Returns:
thisbuilder for use in a chained invocation
-
setBranding
public final RuntimeRepositoryDescription.Builder setBranding(RuntimeRepositoryBranding branding)
Initializes the value for thebrandingattribute.- Parameters:
branding- The value for branding- Returns:
thisbuilder for use in a chained invocation
-
build
public RuntimeRepositoryDescription build()
Builds a newRuntimeRepositoryDescription.- Returns:
- An immutable instance of RuntimeRepositoryDescription
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
-