Package com.io7m.jnoisetype.api
Class NTVersion.Builder
java.lang.Object
com.io7m.jnoisetype.api.NTVersion.Builder
- Enclosing class:
- NTVersion
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newNTVersion.final NTVersion.Builderfrom(NTVersionType instance) Fill a builder with attribute values from the providedNTVersionTypeinstance.final NTVersion.BuildersetMajor(int major) Initializes the value for themajorattribute.final NTVersion.BuildersetMinor(int minor) Initializes the value for theminorattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedNTVersionTypeinstance. 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
-
setMajor
Initializes the value for themajorattribute.- Parameters:
major- The value for major- Returns:
thisbuilder for use in a chained invocation
-
setMinor
Initializes the value for theminorattribute.- Parameters:
minor- The value for minor- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newNTVersion.- Returns:
- An immutable instance of NTVersion
- Throws:
IllegalStateException- if any required attributes are missing
-