Class CChange

  • All Implemented Interfaces:
    CChangeType

    public final class CChange
    extends Object
    implements CChangeType
    A change within a specific release.
    • Method Detail

      • tickets

        public io.vavr.collection.List<CTicketID> tickets()
        Specified by:
        tickets in interface CChangeType
        Returns:
        The change tickets
      • backwardsCompatible

        public boolean backwardsCompatible()
        Specified by:
        backwardsCompatible in interface CChangeType
        Returns:
        true iff the change is backwards compatible
      • withDate

        public final CChange withDate​(ZonedDateTime value)
        Copy the current immutable object by setting a value for the date attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for date
        Returns:
        A modified copy of the this object
      • withSummary

        public final CChange withSummary​(String value)
        Copy the current immutable object by setting a value for the summary attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for summary
        Returns:
        A modified copy of the this object
      • withTickets

        public CChange withTickets​(io.vavr.collection.List<CTicketID> value)
      • withModule

        public final CChange withModule​(CModuleName value)
        Copy the current immutable object by setting a present value for the optional module attribute.
        Parameters:
        value - The value for module
        Returns:
        A modified copy of this object
      • withModule

        public final CChange withModule​(Optional<? extends CModuleName> optional)
        Copy the current immutable object by setting an optional value for the module attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for module
        Returns:
        A modified copy of this object
      • withBackwardsCompatible

        public final CChange withBackwardsCompatible​(boolean value)
        Copy the current immutable object by setting a value for the backwardsCompatible attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for backwardsCompatible
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(Object another)
        This instance is equal to all instances of CChange that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: date, summary, tickets, module, backwardsCompatible.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Prints the immutable value CChange with attribute values.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the value
      • of

        public static CChange of​(ZonedDateTime date,
                                 String summary,
                                 io.vavr.collection.List<CTicketID> tickets,
                                 Optional<? extends CModuleName> module,
                                 boolean backwardsCompatible)
        Construct a new immutable CChange instance.
        Parameters:
        date - The value for the date attribute
        summary - The value for the summary attribute
        tickets - The value for the tickets attribute
        module - The value for the module attribute
        backwardsCompatible - The value for the backwardsCompatible attribute
        Returns:
        An immutable CChange instance
      • copyOf

        public static CChange copyOf​(CChangeType instance)
        Creates an immutable copy of a CChangeType value. 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 CChange instance
      • builder

        public static CChange.Builder builder()
        Creates a builder for CChange.
        Returns:
        A new CChange builder