Package com.io7m.changelog.core
Class CRelease.Builder
java.lang.Object
com.io7m.changelog.core.CRelease.Builder
- Enclosing class:
- CRelease
public static final class CRelease.Builder
extends java.lang.Object
-
Method Summary
Modifier and Type Method Description CRelease.BuilderaddAllChanges(java.lang.Iterable<? extends CChange> elements)Adds elements tochangeslist.CRelease.BuilderaddChanges(CChange element)Adds one element tochangeslist.CRelease.BuilderaddChanges(CChange... elements)Adds elements tochangeslist.CReleasebuild()Builds a newCRelease.CRelease.Builderfrom(CReleaseType instance)Fill a builder with attribute values from the providedCReleaseTypeinstance.CRelease.BuildersetChanges(java.lang.Iterable<? extends CChange> elements)Sets or replaces all elements forchangeslist.CRelease.BuildersetDate(java.time.ZonedDateTime date)Initializes the value for thedateattribute.CRelease.BuildersetOpen(boolean open)Initializes the value for theopenattribute.CRelease.BuildersetTicketSystemID(java.lang.String ticketSystemID)Initializes the value for theticketSystemIDattribute.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:
java.lang.IllegalStateException- if any required attributes are missing
-