private void onStartTicketSystem( final Attributes attributes) { this.elements.push(CurrentElement.TICKET_SYSTEM); this.ticket_system_builder.setDefault(false); for (int index = 0; index < attributes.getLength(); ++index) { switch (attributes.getLocalName(index)) { case "id": { this.ticket_system_builder.setId(attributes.getValue(index)); break; } case "default": { this.ticket_system_builder.setDefault( Boolean.parseBoolean(attributes.getValue(index))); break; } case "url": { this.ticket_system_builder.setUri( URI.create(attributes.getValue(index))); break; } default: { break; } } } }
/** * Sets or replaces all elements for {@link CTicketSystemType#uris() uris} list. * @param elements An iterable of uris elements * @return {@code this} builder for use in a chained invocation */ public final Builder setUris(Iterable<? extends URI> elements) { this.uris.clear(); return addAllUris(elements); }
/** * Builds a new {@link CTicketSystem CTicketSystem}. * @return An immutable instance of CTicketSystem * @throws java.lang.IllegalStateException if any required attributes are missing */ public CTicketSystem build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new CTicketSystem(null, id, createUnmodifiableList(true, uris)); }
/** * Creates an immutable copy of a {@link CTicketSystemType} 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 CTicketSystem instance */ public static CTicketSystem copyOf(CTicketSystemType instance) { if (instance instanceof CTicketSystem) { return (CTicketSystem) instance; } return CTicketSystem.builder() .from(instance) .build(); }
/** * Creates an immutable copy of a {@link CTicketSystemType} 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 CTicketSystem instance */ public static CTicketSystem copyOf(CTicketSystemType instance) { if (instance instanceof CTicketSystem) { return (CTicketSystem) instance; } return CTicketSystem.builder() .from(instance) .build(); }
/** * Fill a builder with attribute values from the provided {@code CTicketSystemType} 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(CTicketSystemType instance) { Objects.requireNonNull(instance, "instance"); setId(instance.id()); addAllUris(instance.uris()); return this; }
private void onEndTicketSystem() { final CTicketSystem ts = this.ticket_system_builder.build(); this.changelog_builder.putTicketSystems(ts.id(), ts); }
/** * Fill a builder with attribute values from the provided {@code CTicketSystemType} 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(CTicketSystemType instance) { Objects.requireNonNull(instance, "instance"); setId(instance.id()); addAllUris(instance.uris()); return this; }
/** * Builds a new {@link CTicketSystem CTicketSystem}. * @return An immutable instance of CTicketSystem * @throws java.lang.IllegalStateException if any required attributes are missing */ public CTicketSystem build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new CTicketSystem(null, id, createUnmodifiableList(true, uris)); }
/** * Creates a builder for {@link CTicketSystem CTicketSystem}. * @return A new CTicketSystem builder */ public static CTicketSystem.Builder builder() { return new CTicketSystem.Builder(); }
/** * Creates a builder for {@link CTicketSystem CTicketSystem}. * @return A new CTicketSystem builder */ public static CTicketSystem.Builder builder() { return new CTicketSystem.Builder(); }
/** * Sets or replaces all elements for {@link CTicketSystemType#uris() uris} list. * @param elements An iterable of uris elements * @return {@code this} builder for use in a chained invocation */ public final Builder setUris(Iterable<? extends URI> elements) { this.uris.clear(); return addAllUris(elements); }