Class CChange.Builder

  • Enclosing class:
    CChange

    public static final class CChange.Builder
    extends Object
    Builds instances of type CChange. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        public final CChange.Builder from​(CChangeType instance)
        Fill a builder with attribute values from the provided CChangeType instance. 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:
        this builder for use in a chained invocation
      • setDate

        public final CChange.Builder setDate​(ZonedDateTime date)
        Initializes the value for the date attribute.
        Parameters:
        date - The value for date
        Returns:
        this builder for use in a chained invocation
      • setSummary

        public final CChange.Builder setSummary​(String summary)
        Initializes the value for the summary attribute.
        Parameters:
        summary - The value for summary
        Returns:
        this builder for use in a chained invocation
      • setModule

        public final CChange.Builder setModule​(CModuleName module)
        Initializes the optional value module to module.
        Parameters:
        module - The value for module
        Returns:
        this builder for chained invocation
      • setModule

        public final CChange.Builder setModule​(Optional<? extends CModuleName> module)
        Initializes the optional value module to module.
        Parameters:
        module - The value for module
        Returns:
        this builder for use in a chained invocation
      • setBackwardsCompatible

        public final CChange.Builder setBackwardsCompatible​(boolean backwardsCompatible)
        Initializes the value for the backwardsCompatible attribute.

        If not set, this attribute will have a default value as returned by the initializer of backwardsCompatible.

        Parameters:
        backwardsCompatible - The value for backwardsCompatible
        Returns:
        this builder for use in a chained invocation