/** * Copy the current immutable object with elements that replace the content of {@link CTicketSystemType#uris() uris}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of uris elements to set * @return A modified copy of {@code this} object */ public final CTicketSystem withUris(Iterable<? extends URI> elements) { if (this.uris == elements) return this; List<URI> newValue = createUnmodifiableList(false, createSafeList(elements, true, false)); return new CTicketSystem(this, this.id, newValue); }
/** * This instance is equal to all instances of {@code CTicketSystem} that have equal attribute values. * @return {@code true} if {@code this} is equal to {@code another} instance */ @Override public boolean equals(Object another) { if (this == another) return true; return another instanceof CTicketSystem && equalTo((CTicketSystem) another); }
/** * Construct a new immutable {@code CTicketSystem} instance. * @param id The value for the {@code id} attribute * @param uris The value for the {@code uris} attribute * @return An immutable CTicketSystem instance */ public static CTicketSystem of(String id, List<URI> uris) { return of(id, (Iterable<? extends URI>) uris); }
private CTicketSystem(String id, Iterable<? extends URI> uris) { this.id = Objects.requireNonNull(id, "id"); this.uris = createUnmodifiableList(false, createSafeList(uris, true, false)); }
/** * 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(); }
/** * Construct a new immutable {@code CTicketSystem} instance. * @param id The value for the {@code id} attribute * @param uris The value for the {@code uris} attribute * @return An immutable CTicketSystem instance */ public static CTicketSystem of(String id, Iterable<? extends URI> uris) { return new CTicketSystem(id, uris); }
private void writeTicketSystem( final Document doc, final Element ticket_systems, final String name, final CTicketSystem ticket_system) { final Element e_system = doc.createElementNS(this.schema_uri, "c:ticket-system"); e_system.setAttribute("id", name); e_system.setAttribute("url", ticket_system.uri().toString()); e_system.setAttribute( "default", String.valueOf(ticket_system.isDefault())); ticket_systems.appendChild(e_system); }
private void onEndTicketSystem() { final CTicketSystem ts = this.ticket_system_builder.build(); this.changelog_builder.putTicketSystems(ts.id(), ts); }
private static Node transformTicket( final CChangelog changelog, final Document doc, final CRelease release, final CTicketID ticket) { final CTicketSystem ticket_system = changelog.ticketSystems().get(release.ticketSystemID()).get(); final Element a = doc.createElement("a"); final String ticket_val = ticket.value(); final URI target = URI.create(ticket_system.uri().toString() + ticket_val); a.setAttribute("href", target.toString()); a.setTextContent(ticket_val); return a; }
private CTicketSystem(String id, Iterable<? extends URI> uris) { this.id = Objects.requireNonNull(id, "id"); this.uris = createUnmodifiableList(false, createSafeList(uris, true, false)); }
/** * 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(); }
/** * Construct a new immutable {@code CTicketSystem} instance. * @param id The value for the {@code id} attribute * @param uris The value for the {@code uris} attribute * @return An immutable CTicketSystem instance */ public static CTicketSystem of(String id, Iterable<? extends URI> uris) { return new CTicketSystem(id, uris); }
/** * Copy the current immutable object with elements that replace the content of {@link CTicketSystemType#uris() uris}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of uris elements to set * @return A modified copy of {@code this} object */ public final CTicketSystem withUris(Iterable<? extends URI> elements) { if (this.uris == elements) return this; List<URI> newValue = createUnmodifiableList(false, createSafeList(elements, true, false)); return new CTicketSystem(this, this.id, newValue); }
Parser( final URI in_uri, final InputStream in_stream, final Consumer<CParseError> in_receiver, final XMLReader in_parser) { this.uri = Objects.requireNonNull(in_uri, "URI"); this.stream = Objects.requireNonNull(in_stream, "Stream"); this.receiver = Objects.requireNonNull(in_receiver, "Receiver"); this.parser = Objects.requireNonNull(in_parser, "Parser"); this.changelog_builder = CChangelog.builder(); this.release_builder = CRelease.builder(); this.change_builder = CChange.builder(); this.ticket_system_builder = CTicketSystem.builder(); this.elements = new ArrayDeque<>(); this.date_format = CDateFormatters.newDateFormatter(); }
/** * Copy the current immutable object by setting a value for the {@link CTicketSystemType#id() id} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for id * @return A modified copy of the {@code this} object */ public final CTicketSystem withId(String value) { if (this.id.equals(value)) return this; String newValue = Objects.requireNonNull(value, "id"); return new CTicketSystem(this, newValue, this.uris); }
/** * Construct a new immutable {@code CTicketSystem} instance. * @param id The value for the {@code id} attribute * @param uris The value for the {@code uris} attribute * @return An immutable CTicketSystem instance */ public static CTicketSystem of(String id, List<URI> uris) { return of(id, (Iterable<? extends URI>) uris); }
/** * This instance is equal to all instances of {@code CTicketSystem} that have equal attribute values. * @return {@code true} if {@code this} is equal to {@code another} instance */ @Override public boolean equals(Object another) { if (this == another) return true; return another instanceof CTicketSystem && equalTo((CTicketSystem) another); }
/** * Copy the current immutable object with elements that replace the content of {@link CTicketSystemType#uris() uris}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final CTicketSystem withUris(URI... elements) { List<URI> newValue = createUnmodifiableList(false, createSafeList(Arrays.asList(elements), true, false)); return new CTicketSystem(this, this.id, newValue); }
/** * Copy the current immutable object by setting a value for the {@link CTicketSystemType#id() id} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for id * @return A modified copy of the {@code this} object */ public final CTicketSystem withId(String value) { if (this.id.equals(value)) return this; String newValue = Objects.requireNonNull(value, "id"); return new CTicketSystem(this, newValue, this.uris); }
/** * Copy the current immutable object with elements that replace the content of {@link CTicketSystemType#uris() uris}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final CTicketSystem withUris(URI... elements) { List<URI> newValue = createUnmodifiableList(false, createSafeList(Arrays.asList(elements), true, false)); return new CTicketSystem(this, this.id, newValue); }