Package com.io7m.jnoisetype.api
Class NTVersion.Builder
java.lang.Object
com.io7m.jnoisetype.api.NTVersion.Builder
- Enclosing class:
- NTVersion
public static final class NTVersion.Builder
extends java.lang.Object
-
Method Summary
Modifier and Type Method Description NTVersionbuild()Builds a newNTVersion.NTVersion.Builderfrom(NTVersionType instance)Fill a builder with attribute values from the providedNTVersionTypeinstance.NTVersion.BuildersetMajor(int major)Initializes the value for themajorattribute.NTVersion.BuildersetMinor(int minor)Initializes the value for theminorattribute.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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:
java.lang.IllegalStateException- if any required attributes are missing
-