Package com.io7m.changelog.core
Class CChangelog
java.lang.Object
com.io7m.changelog.core.CChangelog
- All Implemented Interfaces:
CChangelogType
The type of changelogs.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic CChangelog.Builderbuilder()Creates a builder forCChangelog.static CChangelogcopyOf(CChangelogType instance) Creates an immutable copy of aCChangelogTypevalue.booleanThis instance is equal to all instances ofCChangelogthat have equal attribute values.inthashCode()Computes a hash code from attributes:project,releases,ticketSystems.project()releases()toString()Prints the immutable valueCChangelogwith attribute values.final CChangelogwithProject(CProjectName value) Copy the current immutable object by setting a value for theprojectattribute.final CChangelogwithReleases(SortedMap<CVersion, CRelease> value) Copy the current immutable object by setting a value for thereleasesattribute.final CChangelogwithTicketSystems(Map<String, ? extends CTicketSystem> entries) Copy the current immutable object by replacing theticketSystemsmap with the specified map.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.changelog.core.CChangelogType
checkPreconditions, findTargetRelease, findTargetReleaseOrLatest, findTargetReleaseOrLatestOpen, findTicketSystem, latestRelease, releaseVersions, suggestNextRelease
-
Method Details
-
project
- Specified by:
projectin interfaceCChangelogType- Returns:
- The project name
-
releases
- Specified by:
releasesin interfaceCChangelogType- Returns:
- The list of releases
-
ticketSystems
- Specified by:
ticketSystemsin interfaceCChangelogType- Returns:
- The ticket systems
-
withProject
Copy the current immutable object by setting a value for theprojectattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for project- Returns:
- A modified copy of the
thisobject
-
withReleases
Copy the current immutable object by setting a value for thereleasesattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for releases- Returns:
- A modified copy of the
thisobject
-
withTicketSystems
Copy the current immutable object by replacing theticketSystemsmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the ticketSystems map- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofCChangelogthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:project,releases,ticketSystems. -
toString
Prints the immutable valueCChangelogwith attribute values. -
copyOf
Creates an immutable copy of aCChangelogTypevalue. 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 CChangelog instance
-
builder
Creates a builder forCChangelog.CChangelog.builder() .setProject(com.io7m.changelog.core.CProjectName) // requiredproject.setReleases(SortedMap<CVersion, CRelease>) // optionalreleases.putTicketSystems|putAllTicketSystems(String => CTicketSystem) //ticketSystemsmappings .build();- Returns:
- A new CChangelog builder
-