Package com.io7m.montarre.api
Class MCopying.Builder
java.lang.Object
com.io7m.montarre.api.MCopying.Builder
- Enclosing class:
MCopying
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newMCopying.final MCopying.Builderfrom(MCopyingType instance) Fill a builder with attribute values from the providedMCopyingTypeinstance.final MCopying.BuildersetCopyright(String copyright) Initializes the value for thecopyrightattribute.final MCopying.BuildersetLicense(String license) Initializes the value for thelicenseattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedMCopyingTypeinstance. 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
-
setLicense
Initializes the value for thelicenseattribute.- Parameters:
license- The value for license- Returns:
thisbuilder for use in a chained invocation
-
setCopyright
Initializes the value for thecopyrightattribute.- Parameters:
copyright- The value for copyright- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newMCopying.- Returns:
- An immutable instance of MCopying
- Throws:
IllegalStateException- if any required attributes are missing
-