- java.lang.Object
-
- com.io7m.changelog.core.CChange.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CChange.BuilderaddAllTickets(Iterable<CTicketID> element)CChange.BuilderaddTickets(CTicketID element)CChange.BuilderaddTickets(CTicketID... elements)CChangebuild()Builds a newCChange.CChange.Builderfrom(CChangeType instance)Fill a builder with attribute values from the providedCChangeTypeinstance.CChange.BuildersetBackwardsCompatible(boolean backwardsCompatible)Initializes the value for thebackwardsCompatibleattribute.CChange.BuildersetDate(ZonedDateTime date)Initializes the value for thedateattribute.CChange.BuildersetIterableTickets(Iterable<CTicketID> elements)CChange.BuildersetModule(CModuleName module)Initializes the optional valuemoduleto module.CChange.BuildersetModule(Optional<? extends CModuleName> module)Initializes the optional valuemoduleto module.CChange.BuildersetSummary(String summary)Initializes the value for thesummaryattribute.CChange.BuildersetTickets(io.vavr.collection.List<CTicketID> elements)
-
-
-
Method Detail
-
from
public final CChange.Builder from(CChangeType instance)
Fill a builder with attribute values from the providedCChangeTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setDate
public final CChange.Builder setDate(ZonedDateTime date)
Initializes the value for thedateattribute.- Parameters:
date- The value for date- Returns:
thisbuilder for use in a chained invocation
-
setSummary
public final CChange.Builder setSummary(String summary)
Initializes the value for thesummaryattribute.- Parameters:
summary- The value for summary- Returns:
thisbuilder for use in a chained invocation
-
addTickets
public CChange.Builder addTickets(CTicketID element)
-
addTickets
@SafeVarargs public final CChange.Builder addTickets(CTicketID... elements)
-
addAllTickets
public CChange.Builder addAllTickets(Iterable<CTicketID> element)
-
setTickets
public CChange.Builder setTickets(io.vavr.collection.List<CTicketID> elements)
-
setIterableTickets
public CChange.Builder setIterableTickets(Iterable<CTicketID> elements)
-
setModule
public final CChange.Builder setModule(CModuleName module)
Initializes the optional valuemoduleto module.- Parameters:
module- The value for module- Returns:
thisbuilder for chained invocation
-
setModule
public final CChange.Builder setModule(Optional<? extends CModuleName> module)
Initializes the optional valuemoduleto module.- Parameters:
module- The value for module- Returns:
thisbuilder for use in a chained invocation
-
setBackwardsCompatible
public final CChange.Builder setBackwardsCompatible(boolean backwardsCompatible)
Initializes the value for thebackwardsCompatibleattribute.If not set, this attribute will have a default value as returned by the initializer of
backwardsCompatible.- Parameters:
backwardsCompatible- The value for backwardsCompatible- Returns:
thisbuilder for use in a chained invocation
-
build
public CChange build()
Builds a newCChange.- Returns:
- An immutable instance of CChange
- Throws:
IllegalStateException- if any required attributes are missing
-
-