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.Builder
from
(NTVersionType instance) Fill a builder with attribute values from the providedNTVersionType
instance.final NTVersion.Builder
setMajor
(int major) Initializes the value for themajor
attribute.final NTVersion.Builder
setMinor
(int minor) Initializes the value for theminor
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedNTVersionType
instance. 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:
this
builder for use in a chained invocation
-
setMajor
Initializes the value for themajor
attribute.- Parameters:
major
- The value for major- Returns:
this
builder for use in a chained invocation
-
setMinor
Initializes the value for theminor
attribute.- Parameters:
minor
- The value for minor- Returns:
this
builder for use in a chained invocation
-
build
Builds a newNTVersion
.- Returns:
- An immutable instance of NTVersion
- Throws:
IllegalStateException
- if any required attributes are missing
-