Class ASFile.Builder
java.lang.Object
com.io7m.coffeepick.shipilev_net.internal.ASFile.Builder
- Enclosing class:
- ASFile
public static final class ASFile.Builder
extends java.lang.Object
-
Method Summary
Modifier and Type Method Description ASFilebuild()Builds a newASFile.ASFile.Builderfrom(ASFileType instance)Fill a builder with attribute values from the providedASFileTypeinstance.ASFile.BuildersetDirectory(java.lang.String directory)Initializes the value for thedirectoryattribute.ASFile.BuildersetName(java.lang.String name)Initializes the value for thenameattribute.ASFile.BuildersetSize(long size)Initializes the value for thesizeattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedASFileTypeinstance. 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
-
setDirectory
Initializes the value for thedirectoryattribute.- Parameters:
directory- The value for directory- Returns:
thisbuilder for use in a chained invocation
-
setName
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
setSize
Initializes the value for thesizeattribute.- Parameters:
size- The value for size- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newASFile.- Returns:
- An immutable instance of ASFile
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-