this.release_builder.setChanges(List.empty()); this.release_builder.setDate( ZonedDateTime.of( LocalDate.parse(attributes.getValue(index), this.date_format), this.release_builder.setVersion( CVersions.parse(attributes.getValue(index))); break; this.release_builder.setTicketSystemID( attributes.getValue(index)); break;
/** * Sets or replaces all elements for {@link CReleaseType#items() items} list. * @param elements An iterable of items elements * @return {@code this} builder for use in a chained invocation */ public final Builder setItems(Iterable<? extends CItem> elements) { this.items.clear(); return addAllItems(elements); }
/** * Builds a new {@link CRelease CRelease}. * @return An immutable instance of CRelease * @throws java.lang.IllegalStateException if any required attributes are missing */ public CRelease build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new CRelease(null, date, createUnmodifiableList(true, items), ticketSystemID, version); }
/** * Creates an immutable copy of a {@link CReleaseType} value. * Uses accessors to get values to initialize the new immutable instance. * If an instance is already immutable, it is returned as is. * @param instance The instance to copy * @return A copied immutable CRelease instance */ public static CRelease copyOf(CReleaseType instance) { if (instance instanceof CRelease) { return (CRelease) instance; } return CRelease.builder() .from(instance) .build(); }
/** * Creates an immutable copy of a {@link CReleaseType} value. * Uses accessors to get values to initialize the new immutable instance. * If an instance is already immutable, it is returned as is. * @param instance The instance to copy * @return A copied immutable CRelease instance */ public static CRelease copyOf(CReleaseType instance) { if (instance instanceof CRelease) { return (CRelease) instance; } return CRelease.builder() .from(instance) .build(); }
/** * Fill a builder with attribute values from the provided {@code CReleaseType} instance. * Regular attribute values will be replaced with those from the given instance. * Absent optional values will not replace present values. * Collection elements and entries will be added, not replaced. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ public final Builder from(CReleaseType instance) { Objects.requireNonNull(instance, "instance"); setDate(instance.date()); addAllItems(instance.items()); setTicketSystemID(instance.ticketSystemID()); setVersion(instance.version()); return this; }
/** * Fill a builder with attribute values from the provided {@code CReleaseType} instance. * Regular attribute values will be replaced with those from the given instance. * Absent optional values will not replace present values. * Collection elements and entries will be added, not replaced. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ public final Builder from(CReleaseType instance) { Objects.requireNonNull(instance, "instance"); setDate(instance.date()); addAllItems(instance.items()); setTicketSystemID(instance.ticketSystemID()); setVersion(instance.version()); return this; }
private void onEndRelease() { final CRelease r = this.release_builder.build(); this.changelog_builder.putReleases(r.version(), r); }
private void onEndChange() { final CChange c = this.change_builder.build(); this.release_builder.addChanges(c); }
/** * Sets or replaces all elements for {@link CReleaseType#items() items} list. * @param elements An iterable of items elements * @return {@code this} builder for use in a chained invocation */ public final Builder setItems(Iterable<? extends CItem> elements) { this.items.clear(); return addAllItems(elements); }
/** * Creates a builder for {@link CRelease CRelease}. * @return A new CRelease builder */ public static CRelease.Builder builder() { return new CRelease.Builder(); }
/** * Builds a new {@link CRelease CRelease}. * @return An immutable instance of CRelease * @throws java.lang.IllegalStateException if any required attributes are missing */ public CRelease build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new CRelease(null, date, createUnmodifiableList(true, items), ticketSystemID, version); }
/** * Creates a builder for {@link CRelease CRelease}. * @return A new CRelease builder */ public static CRelease.Builder builder() { return new CRelease.Builder(); }