CChangeTypepublic final class CChange extends java.lang.Object implements CChangeType
| Modifier and Type | Class | Description |
|---|---|---|
static class |
CChange.Builder |
Builds instances of type
CChange. |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
backwardsCompatible() |
|
static CChange.Builder |
builder() |
Creates a builder for
CChange. |
static CChange |
copyOf(CChangeType instance) |
Creates an immutable copy of a
CChangeType value. |
java.time.ZonedDateTime |
date() |
|
boolean |
equals(java.lang.Object another) |
This instance is equal to all instances of
CChange that have equal attribute values. |
int |
hashCode() |
Computes a hash code from attributes:
date, summary, tickets, module, backwardsCompatible. |
java.util.Optional<CModuleName> |
module() |
|
static CChange |
of(java.time.ZonedDateTime date,
java.lang.String summary,
io.vavr.collection.List<CTicketID> tickets,
java.util.Optional<? extends CModuleName> module,
boolean backwardsCompatible) |
Construct a new immutable
CChange instance. |
java.lang.String |
summary() |
|
io.vavr.collection.List<CTicketID> |
tickets() |
|
java.lang.String |
toString() |
Prints the immutable value
CChange with attribute values. |
CChange |
withBackwardsCompatible(boolean value) |
Copy the current immutable object by setting a value for the
backwardsCompatible attribute. |
CChange |
withDate(java.time.ZonedDateTime value) |
Copy the current immutable object by setting a value for the
date attribute. |
CChange |
withModule(CModuleName value) |
Copy the current immutable object by setting a present value for the optional
module attribute. |
CChange |
withModule(java.util.Optional<? extends CModuleName> optional) |
Copy the current immutable object by setting an optional value for the
module attribute. |
CChange |
withSummary(java.lang.String value) |
Copy the current immutable object by setting a value for the
summary attribute. |
CChange |
withTickets(io.vavr.collection.List<CTicketID> value) |
public java.time.ZonedDateTime date()
date in interface CChangeTypepublic java.lang.String summary()
summary in interface CChangeTypepublic io.vavr.collection.List<CTicketID> tickets()
tickets in interface CChangeTypepublic java.util.Optional<CModuleName> module()
module in interface CChangeTypepublic boolean backwardsCompatible()
backwardsCompatible in interface CChangeTypetrue iff the change is backwards compatiblepublic final CChange withDate(java.time.ZonedDateTime value)
date attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for datethis objectpublic final CChange withSummary(java.lang.String value)
summary attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for summarythis objectpublic final CChange withModule(CModuleName value)
module attribute.value - The value for modulethis objectpublic final CChange withModule(java.util.Optional<? extends CModuleName> optional)
module attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for modulethis objectpublic final CChange withBackwardsCompatible(boolean value)
backwardsCompatible attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for backwardsCompatiblethis objectpublic boolean equals(java.lang.Object another)
CChange that have equal attribute values.equals in class java.lang.Objecttrue if this is equal to another instancepublic int hashCode()
date, summary, tickets, module, backwardsCompatible.hashCode in class java.lang.Objectpublic java.lang.String toString()
CChange with attribute values.toString in class java.lang.Objectpublic static CChange of(java.time.ZonedDateTime date, java.lang.String summary, io.vavr.collection.List<CTicketID> tickets, java.util.Optional<? extends CModuleName> module, boolean backwardsCompatible)
CChange instance.date - The value for the date attributesummary - The value for the summary attributetickets - The value for the tickets attributemodule - The value for the module attributebackwardsCompatible - The value for the backwardsCompatible attributepublic static CChange copyOf(CChangeType instance)
CChangeType value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static CChange.Builder builder()
CChange.Copyright © 2017 <code@io7m.com> http://io7m.com