/** * Copy the current immutable object by setting a value for the {@link Ports#getDns() dns} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for dns * @return A modified copy of the {@code this} object */ public final ImmutablePorts withDns(int value) { if (this.dns == value) return this; return new ImmutablePorts(value, this.http, this.rpc, this.serfLan, this.serfWan, this.server); }
/** * Copy the current immutable object by setting a value for the {@link Ports#getHttp() http} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for http * @return A modified copy of the {@code this} object */ public final ImmutablePorts withHttp(int value) { if (this.http == value) return this; return new ImmutablePorts(this.dns, value, this.rpc, this.serfLan, this.serfWan, this.server); }
/** * Copy the current immutable object by setting a value for the {@link Ports#getServer() server} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for server * @return A modified copy of the {@code this} object */ public final ImmutablePorts withServer(int value) { if (this.server == value) return this; return new ImmutablePorts(this.dns, this.http, this.rpc, this.serfLan, this.serfWan, value); }
/** * Copy the current immutable object by setting a value for the {@link Ports#getSerfLan() serfLan} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for serfLan * @return A modified copy of the {@code this} object */ public final ImmutablePorts withSerfLan(int value) { if (this.serfLan == value) return this; return new ImmutablePorts(this.dns, this.http, this.rpc, value, this.serfWan, this.server); }
/** * Copy the current immutable object by setting a value for the {@link Ports#getRpc() rpc} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for rpc * @return A modified copy of the {@code this} object */ public final ImmutablePorts withRpc(int value) { if (this.rpc == value) return this; return new ImmutablePorts(this.dns, this.http, value, this.serfLan, this.serfWan, this.server); }
/** * Copy the current immutable object by setting a value for the {@link Ports#getSerfWan() serfWan} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for serfWan * @return A modified copy of the {@code this} object */ public final ImmutablePorts withSerfWan(int value) { if (this.serfWan == value) return this; return new ImmutablePorts(this.dns, this.http, this.rpc, this.serfLan, value, this.server); }
/** * Builds a new {@link ImmutablePorts ImmutablePorts}. * @return An immutable instance of Ports * @throws java.lang.IllegalStateException if any required attributes are missing */ public ImmutablePorts build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new ImmutablePorts(dns, http, rpc, serfLan, serfWan, server); }