/** * Copy the current immutable object by setting a value for the {@link FileVariable#getFirstLineIsColumnName() firstLineIsColumnName} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for firstLineIsColumnName * @return A modified copy of the {@code this} object */ public final ImmutableFileVariable withFirstLineIsColumnName(boolean value) { if (this.firstLineIsColumnName == value) return this; return new ImmutableFileVariable( this.columnsDelimiter, this.columnsNames, this.data, this.fileName, value, this.numOfFirstRowData, this.name, this.description, this.order, this.policy, this.scope, this.noValuesLeftBehavior); }
/** * Copy the current immutable object by setting a value for the {@link FileVariable#getNumOfFirstRowData() numOfFirstRowData} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for numOfFirstRowData * @return A modified copy of the {@code this} object */ public final ImmutableFileVariable withNumOfFirstRowData(int value) { if (this.numOfFirstRowData == value) return this; return new ImmutableFileVariable( this.columnsDelimiter, this.columnsNames, this.data, this.fileName, this.firstLineIsColumnName, value, this.name, this.description, this.order, this.policy, this.scope, this.noValuesLeftBehavior); }
/** * Copy the current immutable object with elements that replace the content of {@link FileVariable#getColumnsNames() columnsNames}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutableFileVariable withColumnsNames(String... elements) { ImmutableList<String> newValue = ImmutableList.copyOf(elements); return new ImmutableFileVariable( this.columnsDelimiter, newValue, this.data, this.fileName, this.firstLineIsColumnName, this.numOfFirstRowData, this.name, this.description, this.order, this.policy, this.scope, this.noValuesLeftBehavior); }
/** * Copy the current immutable object with elements that replace the content of {@link FileVariable#getColumnsNames() columnsNames}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of columnsNames elements to set * @return A modified copy of {@code this} object */ public final ImmutableFileVariable withColumnsNames(Iterable<String> elements) { if (this.columnsNames == elements) return this; ImmutableList<String> newValue = ImmutableList.copyOf(elements); return new ImmutableFileVariable( this.columnsDelimiter, newValue, this.data, this.fileName, this.firstLineIsColumnName, this.numOfFirstRowData, this.name, this.description, this.order, this.policy, this.scope, this.noValuesLeftBehavior); }
/** * Copy the current immutable object by setting a value for the {@link FileVariable#getPolicy() policy} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for policy * @return A modified copy of the {@code this} object */ public final ImmutableFileVariable withPolicy(Variable.VariablePolicy value) { if (this.policy == value) return this; Variable.VariablePolicy newValue = Objects.requireNonNull(value, "policy"); return new ImmutableFileVariable( this.columnsDelimiter, this.columnsNames, this.data, this.fileName, this.firstLineIsColumnName, this.numOfFirstRowData, this.name, this.description, this.order, newValue, this.scope, this.noValuesLeftBehavior); }
/** * Copy the current immutable object by setting a value for the {@link FileVariable#getScope() scope} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for scope * @return A modified copy of the {@code this} object */ public final ImmutableFileVariable withScope(Variable.VariableScope value) { if (this.scope == value) return this; Variable.VariableScope newValue = Objects.requireNonNull(value, "scope"); return new ImmutableFileVariable( this.columnsDelimiter, this.columnsNames, this.data, this.fileName, this.firstLineIsColumnName, this.numOfFirstRowData, this.name, this.description, this.order, this.policy, newValue, this.noValuesLeftBehavior); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link FileVariable#getNoValuesLeftBehavior() noValuesLeftBehavior} attribute. * @param value The value for noValuesLeftBehavior * @return A modified copy of {@code this} object */ public final ImmutableFileVariable withNoValuesLeftBehavior(Variable.VariableNoValuesLeftBehavior value) { @Nullable Variable.VariableNoValuesLeftBehavior newValue = Objects.requireNonNull(value, "noValuesLeftBehavior"); if (this.noValuesLeftBehavior == newValue) return this; return new ImmutableFileVariable( this.columnsDelimiter, this.columnsNames, this.data, this.fileName, this.firstLineIsColumnName, this.numOfFirstRowData, this.name, this.description, this.order, this.policy, this.scope, newValue); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link FileVariable#getData() data} attribute. * @param value The value for data * @return A modified copy of {@code this} object */ public final ImmutableFileVariable withData(String[][] value) { @Nullable String[][] newValue = Objects.requireNonNull(value, "data"); if (this.data == newValue) return this; return new ImmutableFileVariable( this.columnsDelimiter, this.columnsNames, newValue, this.fileName, this.firstLineIsColumnName, this.numOfFirstRowData, this.name, this.description, this.order, this.policy, this.scope, this.noValuesLeftBehavior); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link FileVariable#getOrder() order} attribute. * @param value The value for order * @return A modified copy of {@code this} object */ public final ImmutableFileVariable withOrder(Variable.VariableOrder value) { @Nullable Variable.VariableOrder newValue = Objects.requireNonNull(value, "order"); if (this.order == newValue) return this; return new ImmutableFileVariable( this.columnsDelimiter, this.columnsNames, this.data, this.fileName, this.firstLineIsColumnName, this.numOfFirstRowData, this.name, this.description, newValue, this.policy, this.scope, this.noValuesLeftBehavior); }
/** * Copy the current immutable object by setting a value for the {@link FileVariable#getColumnsDelimiter() columnsDelimiter} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for columnsDelimiter * @return A modified copy of the {@code this} object */ public final ImmutableFileVariable withColumnsDelimiter(String value) { if (this.columnsDelimiter.equals(value)) return this; String newValue = Objects.requireNonNull(value, "columnsDelimiter"); return new ImmutableFileVariable( newValue, this.columnsNames, this.data, this.fileName, this.firstLineIsColumnName, this.numOfFirstRowData, this.name, this.description, this.order, this.policy, this.scope, this.noValuesLeftBehavior); }
/** * Copy the current immutable object by setting a value for the {@link FileVariable#getName() name} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for name * @return A modified copy of the {@code this} object */ public final ImmutableFileVariable withName(String value) { if (this.name.equals(value)) return this; String newValue = Objects.requireNonNull(value, "name"); return new ImmutableFileVariable( this.columnsDelimiter, this.columnsNames, this.data, this.fileName, this.firstLineIsColumnName, this.numOfFirstRowData, newValue, this.description, this.order, this.policy, this.scope, this.noValuesLeftBehavior); }
/** * Copy the current immutable object by setting an optional value for the {@link FileVariable#getData() data} attribute. * A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning {@code this}. * @param optional A value for data * @return A modified copy of {@code this} object */ public final ImmutableFileVariable withData(Optional<? extends String[][]> optional) { @Nullable String[][] value = optional.orElse(null); if (this.data == value) return this; return new ImmutableFileVariable( this.columnsDelimiter, this.columnsNames, value, this.fileName, this.firstLineIsColumnName, this.numOfFirstRowData, this.name, this.description, this.order, this.policy, this.scope, this.noValuesLeftBehavior); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link FileVariable#getFileName() fileName} attribute. * @param value The value for fileName * @return A modified copy of {@code this} object */ public final ImmutableFileVariable withFileName(String value) { @Nullable String newValue = Objects.requireNonNull(value, "fileName"); if (Objects.equals(this.fileName, newValue)) return this; return new ImmutableFileVariable( this.columnsDelimiter, this.columnsNames, this.data, newValue, this.firstLineIsColumnName, this.numOfFirstRowData, this.name, this.description, this.order, this.policy, this.scope, this.noValuesLeftBehavior); }
/** * Copy the current immutable object by setting an optional value for the {@link FileVariable#getFileName() fileName} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for fileName * @return A modified copy of {@code this} object */ public final ImmutableFileVariable withFileName(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.fileName, value)) return this; return new ImmutableFileVariable( this.columnsDelimiter, this.columnsNames, this.data, value, this.firstLineIsColumnName, this.numOfFirstRowData, this.name, this.description, this.order, this.policy, this.scope, this.noValuesLeftBehavior); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link FileVariable#getDescription() description} attribute. * @param value The value for description * @return A modified copy of {@code this} object */ public final ImmutableFileVariable withDescription(String value) { @Nullable String newValue = Objects.requireNonNull(value, "description"); if (Objects.equals(this.description, newValue)) return this; return new ImmutableFileVariable( this.columnsDelimiter, this.columnsNames, this.data, this.fileName, this.firstLineIsColumnName, this.numOfFirstRowData, this.name, newValue, this.order, this.policy, this.scope, this.noValuesLeftBehavior); }
/** * Copy the current immutable object by setting an optional value for the {@link FileVariable#getOrder() order} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for order * @return A modified copy of {@code this} object */ public final ImmutableFileVariable withOrder(Optional<? extends Variable.VariableOrder> optional) { @Nullable Variable.VariableOrder value = optional.orElse(null); if (Objects.equals(this.order, value)) return this; return new ImmutableFileVariable( this.columnsDelimiter, this.columnsNames, this.data, this.fileName, this.firstLineIsColumnName, this.numOfFirstRowData, this.name, this.description, value, this.policy, this.scope, this.noValuesLeftBehavior); }
/** * Copy the current immutable object by setting an optional value for the {@link FileVariable#getDescription() description} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for description * @return A modified copy of {@code this} object */ public final ImmutableFileVariable withDescription(Optional<String> optional) { @Nullable String value = optional.orElse(null); if (Objects.equals(this.description, value)) return this; return new ImmutableFileVariable( this.columnsDelimiter, this.columnsNames, this.data, this.fileName, this.firstLineIsColumnName, this.numOfFirstRowData, this.name, value, this.order, this.policy, this.scope, this.noValuesLeftBehavior); }
/** * Copy the current immutable object by setting an optional value for the {@link FileVariable#getNoValuesLeftBehavior() noValuesLeftBehavior} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for noValuesLeftBehavior * @return A modified copy of {@code this} object */ public final ImmutableFileVariable withNoValuesLeftBehavior(Optional<? extends Variable.VariableNoValuesLeftBehavior> optional) { @Nullable Variable.VariableNoValuesLeftBehavior value = optional.orElse(null); if (Objects.equals(this.noValuesLeftBehavior, value)) return this; return new ImmutableFileVariable( this.columnsDelimiter, this.columnsNames, this.data, this.fileName, this.firstLineIsColumnName, this.numOfFirstRowData, this.name, this.description, this.order, this.policy, this.scope, value); }
/** * Builds a new {@link ImmutableFileVariable ImmutableFileVariable}. * @return An immutable instance of FileVariable * @throws java.lang.IllegalStateException if any required attributes are missing */ public ImmutableFileVariable build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new ImmutableFileVariable( columnsDelimiter, columnsNames.build(), data, fileName, firstLineIsColumnName, numOfFirstRowData, name, description, order, policy, scope, noValuesLeftBehavior); }