/** * Construct a new immutable {@code ContractLongCondition} instance. * @param predicate The value for the {@code predicate} attribute * @param describer The value for the {@code describer} attribute * @return An immutable ContractLongCondition instance */ public static ContractLongCondition of(LongPredicate predicate, LongFunction<String> describer) { return new ContractLongCondition(predicate, describer); }
/** * Construct a new immutable {@code ContractLongCondition} instance. * @param predicate The value for the {@code predicate} attribute * @param describer The value for the {@code describer} attribute * @return An immutable ContractLongCondition instance */ public static ContractLongCondition of(LongPredicate predicate, LongFunction<String> describer) { return new ContractLongCondition(predicate, describer); }
/** * Copy the current immutable object by setting a value for the {@link ContractLongConditionType#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 ContractLongCondition withPredicate(LongPredicate value) { if (this.predicate == value) return this; LongPredicate newValue = Objects.requireNonNull(value, "predicate"); return new ContractLongCondition(this, newValue, this.describer); }
/** * Copy the current immutable object by setting a value for the {@link ContractLongConditionType#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 ContractLongCondition withPredicate(LongPredicate value) { if (this.predicate == value) return this; LongPredicate newValue = Objects.requireNonNull(value, "predicate"); return new ContractLongCondition(this, newValue, this.describer); }
/** * Copy the current immutable object by setting a value for the {@link ContractLongConditionType#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 ContractLongCondition withDescriber(LongFunction<String> value) { if (this.describer == value) return this; LongFunction<String> newValue = Objects.requireNonNull(value, "describer"); return new ContractLongCondition(this, this.predicate, newValue); }
/** * Copy the current immutable object by setting a value for the {@link ContractLongConditionType#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 ContractLongCondition withDescriber(LongFunction<String> value) { if (this.describer == value) return this; LongFunction<String> newValue = Objects.requireNonNull(value, "describer"); return new ContractLongCondition(this, this.predicate, newValue); }
/** * Builds a new {@link ContractLongCondition ContractLongCondition}. * @return An immutable instance of ContractLongCondition * @throws java.lang.IllegalStateException if any required attributes are missing */ public ContractLongCondition build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new ContractLongCondition(null, predicate, describer); }
/** * Builds a new {@link ContractLongCondition ContractLongCondition}. * @return An immutable instance of ContractLongCondition * @throws java.lang.IllegalStateException if any required attributes are missing */ public ContractLongCondition build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new ContractLongCondition(null, predicate, describer); }