Package com.io7m.changelog.core
Class CRelease
java.lang.Object
com.io7m.changelog.core.CRelease
- All Implemented Interfaces:
CReleaseType
A specific release in a changelog.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic CRelease.Builderbuilder()Creates a builder forCRelease.changes()static CReleasecopyOf(CReleaseType instance) Creates an immutable copy of aCReleaseTypevalue.date()booleanThis instance is equal to all instances ofCReleasethat have equal attribute values.inthashCode()Computes a hash code from attributes:date,changes,ticketSystemID,version,open.booleanisOpen()toString()Prints the immutable valueCReleasewith attribute values.version()final CReleasewithChanges(CChange... elements) Copy the current immutable object with elements that replace the content ofchanges.final CReleasewithChanges(Iterable<? extends CChange> elements) Copy the current immutable object with elements that replace the content ofchanges.final CReleasewithDate(ZonedDateTime value) Copy the current immutable object by setting a value for thedateattribute.final CReleasewithOpen(boolean value) Copy the current immutable object by setting a value for theopenattribute.final CReleasewithTicketSystemID(String value) Copy the current immutable object by setting a value for theticketSystemIDattribute.final CReleasewithVersion(CVersion value) Copy the current immutable object by setting a value for theversionattribute.
-
Method Details
-
date
- Specified by:
datein interfaceCReleaseType- Returns:
- The release date
-
changes
- Specified by:
changesin interfaceCReleaseType- Returns:
- The list of release changes
-
ticketSystemID
- Specified by:
ticketSystemIDin interfaceCReleaseType- Returns:
- The ticket system ID
-
version
- Specified by:
versionin interfaceCReleaseType- Returns:
- The version number
-
isOpen
public boolean isOpen()- Specified by:
isOpenin interfaceCReleaseType- Returns:
trueif the release is open for modifications
-
withDate
Copy the current immutable object by setting a value for thedateattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for date- Returns:
- A modified copy of the
thisobject
-
withChanges
Copy the current immutable object with elements that replace the content ofchanges.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withChanges
Copy the current immutable object with elements that replace the content ofchanges. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of changes elements to set- Returns:
- A modified copy of
thisobject
-
withTicketSystemID
Copy the current immutable object by setting a value for theticketSystemIDattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ticketSystemID- Returns:
- A modified copy of the
thisobject
-
withVersion
Copy the current immutable object by setting a value for theversionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for version- Returns:
- A modified copy of the
thisobject
-
withOpen
Copy the current immutable object by setting a value for theopenattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for open- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofCReleasethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:date,changes,ticketSystemID,version,open. -
toString
Prints the immutable valueCReleasewith attribute values. -
copyOf
Creates an immutable copy of aCReleaseTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable CRelease instance
-
builder
Creates a builder forCRelease.CRelease.builder() .setDate(java.time.ZonedDateTime) // requireddate.addChanges|addAllChanges(CChange) //changeselements .setTicketSystemID(String) // requiredticketSystemID.setVersion(com.io7m.changelog.core.CVersion) // requiredversion.setOpen(boolean) // requiredopen.build();- Returns:
- A new CRelease builder
-