Package com.io7m.jnoisetype.api
Class NTSource.Builder
java.lang.Object
com.io7m.jnoisetype.api.NTSource.Builder
- Enclosing class:
- NTSource
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newNTSource
.final NTSource.Builder
from
(NTSourceType instance) Fill a builder with attribute values from the providedNTSourceType
instance.final NTSource.Builder
setOffset
(long offset) Initializes the value for theoffset
attribute.final NTSource.Builder
Initializes the value for thesource
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedNTSourceType
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
-
setSource
Initializes the value for thesource
attribute.- Parameters:
source
- The value for source- Returns:
this
builder for use in a chained invocation
-
setOffset
Initializes the value for theoffset
attribute.- Parameters:
offset
- The value for offset- Returns:
this
builder for use in a chained invocation
-
build
Builds a newNTSource
.- Returns:
- An immutable instance of NTSource
- Throws:
IllegalStateException
- if any required attributes are missing
-