/** * Construct a new immutable {@code ContractDoubleCondition} instance. * @param predicate The value for the {@code predicate} attribute * @param describer The value for the {@code describer} attribute * @return An immutable ContractDoubleCondition instance */ public static ContractDoubleCondition of(DoublePredicate predicate, DoubleFunction<String> describer) { return new ContractDoubleCondition(predicate, describer); }
/** * Construct a new immutable {@code ContractDoubleCondition} instance. * @param predicate The value for the {@code predicate} attribute * @param describer The value for the {@code describer} attribute * @return An immutable ContractDoubleCondition instance */ public static ContractDoubleCondition of(DoublePredicate predicate, DoubleFunction<String> describer) { return new ContractDoubleCondition(predicate, describer); }
/** * Copy the current immutable object by setting a value for the {@link ContractDoubleConditionType#describer() describer} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for describer * @return A modified copy of the {@code this} object */ public final ContractDoubleCondition withDescriber(DoubleFunction<String> value) { if (this.describer == value) return this; DoubleFunction<String> newValue = Objects.requireNonNull(value, "describer"); return new ContractDoubleCondition(this, this.predicate, newValue); }
/** * Copy the current immutable object by setting a value for the {@link ContractDoubleConditionType#predicate() predicate} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for predicate * @return A modified copy of the {@code this} object */ public final ContractDoubleCondition withPredicate(DoublePredicate value) { if (this.predicate == value) return this; DoublePredicate newValue = Objects.requireNonNull(value, "predicate"); return new ContractDoubleCondition(this, newValue, this.describer); }
/** * Copy the current immutable object by setting a value for the {@link ContractDoubleConditionType#describer() describer} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for describer * @return A modified copy of the {@code this} object */ public final ContractDoubleCondition withDescriber(DoubleFunction<String> value) { if (this.describer == value) return this; DoubleFunction<String> newValue = Objects.requireNonNull(value, "describer"); return new ContractDoubleCondition(this, this.predicate, newValue); }
/** * Copy the current immutable object by setting a value for the {@link ContractDoubleConditionType#predicate() predicate} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for predicate * @return A modified copy of the {@code this} object */ public final ContractDoubleCondition withPredicate(DoublePredicate value) { if (this.predicate == value) return this; DoublePredicate newValue = Objects.requireNonNull(value, "predicate"); return new ContractDoubleCondition(this, newValue, this.describer); }
/** * Builds a new {@link ContractDoubleCondition ContractDoubleCondition}. * @return An immutable instance of ContractDoubleCondition * @throws java.lang.IllegalStateException if any required attributes are missing */ public ContractDoubleCondition build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new ContractDoubleCondition(null, predicate, describer); }
/** * Builds a new {@link ContractDoubleCondition ContractDoubleCondition}. * @return An immutable instance of ContractDoubleCondition * @throws java.lang.IllegalStateException if any required attributes are missing */ public ContractDoubleCondition build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new ContractDoubleCondition(null, predicate, describer); }