Package com.io7m.changelog.core
Class CRelease.Builder
java.lang.Object
com.io7m.changelog.core.CRelease.Builder
- Enclosing class:
CRelease
-
Method Summary
Modifier and TypeMethodDescriptionfinal CRelease.BuilderaddAllChanges(Iterable<? extends CChange> elements) Adds elements tochangeslist.final CRelease.BuilderaddChanges(CChange element) Adds one element tochangeslist.final CRelease.BuilderaddChanges(CChange... elements) Adds elements tochangeslist.build()Builds a newCRelease.final CRelease.Builderfrom(CReleaseType instance) Fill a builder with attribute values from the providedCReleaseTypeinstance.final CRelease.BuildersetChanges(Iterable<? extends CChange> elements) Sets or replaces all elements forchangeslist.final CRelease.BuildersetDate(ZonedDateTime date) Initializes the value for thedateattribute.final CRelease.BuildersetOpen(boolean open) Initializes the value for theopenattribute.final CRelease.BuildersetTicketSystemID(String ticketSystemID) Initializes the value for theticketSystemIDattribute.final CRelease.BuildersetVersion(CVersion version) Initializes the value for theversionattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedCReleaseTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setDate
Initializes the value for thedateattribute.- Parameters:
date- The value for date- Returns:
thisbuilder for use in a chained invocation
-
addChanges
Adds one element tochangeslist.- Parameters:
element- A changes element- Returns:
thisbuilder for use in a chained invocation
-
addChanges
Adds elements tochangeslist.- Parameters:
elements- An array of changes elements- Returns:
thisbuilder for use in a chained invocation
-
setChanges
Sets or replaces all elements forchangeslist.- Parameters:
elements- An iterable of changes elements- Returns:
thisbuilder for use in a chained invocation
-
addAllChanges
Adds elements tochangeslist.- Parameters:
elements- An iterable of changes elements- Returns:
thisbuilder for use in a chained invocation
-
setTicketSystemID
Initializes the value for theticketSystemIDattribute.- Parameters:
ticketSystemID- The value for ticketSystemID- Returns:
thisbuilder for use in a chained invocation
-
setVersion
Initializes the value for theversionattribute.- Parameters:
version- The value for version- Returns:
thisbuilder for use in a chained invocation
-
setOpen
Initializes the value for theopenattribute.- Parameters:
open- The value for open- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newCRelease.- Returns:
- An immutable instance of CRelease
- Throws:
IllegalStateException- if any required attributes are missing
-