Package com.io7m.smfj.core
Class SMFFormatDescription.Builder
- java.lang.Object
-
- com.io7m.smfj.core.SMFFormatDescription.Builder
-
- Enclosing class:
- SMFFormatDescription
public static final class SMFFormatDescription.Builder extends java.lang.ObjectBuilds instances of typeSMFFormatDescription. 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 SMFFormatDescriptionbuild()Builds a newSMFFormatDescription.SMFFormatDescription.Builderfrom(SMFFormatDescriptionType instance)Fill a builder with attribute values from the providedSMFFormatDescriptionTypeinstance.SMFFormatDescription.BuildersetDescription(java.lang.String description)Initializes the value for thedescriptionattribute.SMFFormatDescription.BuildersetMimeType(java.lang.String mimeType)Initializes the value for themimeTypeattribute.SMFFormatDescription.BuildersetName(java.lang.String name)Initializes the value for thenameattribute.SMFFormatDescription.BuildersetRandomAccess(boolean randomAccess)Initializes the value for therandomAccessattribute.SMFFormatDescription.BuildersetSuffix(java.lang.String suffix)Initializes the value for thesuffixattribute.
-
-
-
Method Detail
-
from
public final SMFFormatDescription.Builder from(SMFFormatDescriptionType instance)
Fill a builder with attribute values from the providedSMFFormatDescriptionTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setDescription
public final SMFFormatDescription.Builder setDescription(java.lang.String description)
Initializes the value for thedescriptionattribute.- Parameters:
description- The value for description- Returns:
thisbuilder for use in a chained invocation
-
setSuffix
public final SMFFormatDescription.Builder setSuffix(java.lang.String suffix)
Initializes the value for thesuffixattribute.- Parameters:
suffix- The value for suffix- Returns:
thisbuilder for use in a chained invocation
-
setMimeType
public final SMFFormatDescription.Builder setMimeType(java.lang.String mimeType)
Initializes the value for themimeTypeattribute.- Parameters:
mimeType- The value for mimeType- Returns:
thisbuilder for use in a chained invocation
-
setName
public final SMFFormatDescription.Builder setName(java.lang.String name)
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
setRandomAccess
public final SMFFormatDescription.Builder setRandomAccess(boolean randomAccess)
Initializes the value for therandomAccessattribute.- Parameters:
randomAccess- The value for randomAccess- Returns:
thisbuilder for use in a chained invocation
-
build
public SMFFormatDescription build()
Builds a newSMFFormatDescription.- Returns:
- An immutable instance of SMFFormatDescription
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
-