- java.lang.Object
-
- com.io7m.changelog.core.CChangelog
-
- All Implemented Interfaces:
CChangelogType
public final class CChangelog extends Object implements CChangelogType
The type of changelogs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCChangelog.BuilderBuilds instances of typeCChangelog.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CChangelog.Builderbuilder()Creates a builder forCChangelog.static CChangelogcopyOf(CChangelogType instance)Creates an immutable copy of aCChangelogTypevalue.booleanequals(Object another)This instance is equal to all instances ofCChangelogthat have equal attribute values.inthashCode()Computes a hash code from attributes:project,releases,ticketSystems.static CChangelogof(CProjectName project, io.vavr.collection.SortedMap<CVersionType,CRelease> releases, io.vavr.collection.Map<String,CTicketSystem> ticketSystems)Construct a new immutableCChangeloginstance.CProjectNameproject()io.vavr.collection.SortedMap<CVersionType,CRelease>releases()io.vavr.collection.Map<String,CTicketSystem>ticketSystems()StringtoString()Prints the immutable valueCChangelogwith attribute values.CChangelogwithProject(CProjectName value)Copy the current immutable object by setting a value for theprojectattribute.CChangelogwithReleases(io.vavr.collection.SortedMap<CVersionType,CRelease> value)CChangelogwithTicketSystems(io.vavr.collection.Map<String,CTicketSystem> value)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.io7m.changelog.core.CChangelogType
checkPreconditions
-
-
-
-
Method Detail
-
project
public CProjectName project()
- Specified by:
projectin interfaceCChangelogType- Returns:
- The project name
-
releases
public io.vavr.collection.SortedMap<CVersionType,CRelease> releases()
- Specified by:
releasesin interfaceCChangelogType- Returns:
- The list of releases
-
ticketSystems
public io.vavr.collection.Map<String,CTicketSystem> ticketSystems()
- Specified by:
ticketSystemsin interfaceCChangelogType- Returns:
- The ticket systems
-
withProject
public final CChangelog withProject(CProjectName value)
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
public CChangelog withReleases(io.vavr.collection.SortedMap<CVersionType,CRelease> value)
-
withTicketSystems
public CChangelog withTicketSystems(io.vavr.collection.Map<String,CTicketSystem> value)
-
equals
public boolean equals(Object another)
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
public String toString()
Prints the immutable valueCChangelogwith attribute values.
-
of
public static CChangelog of(CProjectName project, io.vavr.collection.SortedMap<CVersionType,CRelease> releases, io.vavr.collection.Map<String,CTicketSystem> ticketSystems)
Construct a new immutableCChangeloginstance.- Parameters:
project- The value for theprojectattributereleases- The value for thereleasesattributeticketSystems- The value for theticketSystemsattribute- Returns:
- An immutable CChangelog instance
-
copyOf
public static CChangelog copyOf(CChangelogType instance)
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
public static CChangelog.Builder builder()
Creates a builder forCChangelog.- Returns:
- A new CChangelog builder
-
-