/** * Adds the provided {@link ImmutableValue}s to the {@link List} of * "rejected" {@link ImmutableValue}s. The rejected values are always * copied for every {@link DataTransactionResult} for referencing. It is * also possible to retrieve these rejected {@link ImmutableValue}s to * {@link DataHolder#undo(DataTransactionResult)} at a later point in * the lifespan of the {@link DataHolder}. * * @param values The values to reject * @return This builder, for chaining */ public Builder reject(final Iterable<ImmutableValue<?>> values) { for (ImmutableValue<?> value : values) { reject(checkNotNull(value)); } return this; }
/** * Adds the provided {@link ImmutableValue}s to the {@link List} of * "rejected" {@link ImmutableValue}s. The rejected values are always * copied for every {@link DataTransactionResult} for referencing. It is * also possible to retrieve these rejected {@link ImmutableValue}s to * {@link DataHolder#undo(DataTransactionResult)} at a later point in * the lifespan of the {@link DataHolder}. * * @param values The values to reject * @return This builder, for chaining */ public Builder reject(final Iterable<ImmutableValue<?>> values) { for (ImmutableValue<?> value : values) { reject(checkNotNull(value)); } return this; }
/** * Creates a new {@link DataTransactionResult} that ends in failure. The * provided {@link ImmutableValue} is considered "incompatible" and was not * successfully added. * * @param value The value that was incompatible or errored * @return The new data transaction result */ public static DataTransactionResult errorResult(final ImmutableValue<?> value) { return builder().result(Type.ERROR).reject(value).build(); }
/** * Creates a new {@link DataTransactionResult} that ends in failure. The * provided {@link ImmutableValue}s are considered "rejected" and were not * successfully added. * * @param values The values that were rejected * @return The new data transaction result */ public static DataTransactionResult failResult(final Iterable<ImmutableValue<?>> values) { return builder().reject(values).result(Type.FAILURE).build(); }
/** * Creates a new {@link DataTransactionResult} that ends in failure. The * provided {@link ImmutableValue} is considered "rejected" and was not * successfully added. * * @param value The value that was rejected * @return The new data transaction result */ public static DataTransactionResult failResult(final ImmutableValue<?> value) { return builder().reject(value).result(Type.FAILURE).build(); }
/** * Creates a new {@link DataTransactionResult} that ends in failure. The * provided {@link ImmutableValue} is considered "incompatible" and was not * successfully added. * * @param value The value that was incompatible or errored * @return The new data transaction result */ public static DataTransactionResult errorResult(final ImmutableValue<?> value) { return builder().result(Type.ERROR).reject(value).build(); }
/** * Creates a new {@link DataTransactionResult} that ends in failure. The * provided {@link ImmutableValue}s are considered "rejected" and were not * successfully added. * * @param values The values that were rejected * @return The new data transaction result */ public static DataTransactionResult failResult(final Iterable<ImmutableValue<?>> values) { return builder().reject(values).result(Type.FAILURE).build(); }
/** * Creates a new {@link DataTransactionResult} that ends in failure. The * provided {@link ImmutableValue} is considered "rejected" and was not * successfully added. * * @param value The value that was rejected * @return The new data transaction result */ public static DataTransactionResult failResult(final ImmutableValue<?> value) { return builder().reject(value).result(Type.FAILURE).build(); }