K
- consumed record key type@FunctionalInterface
public interface UpdateOperation<K extends java.lang.Comparable<K>>
Modifier and Type | Interface and Description |
---|---|
static interface |
UpdateOperation.BoolWriteOperationBuilder
A builder for a transform that writes a single boolean cell.
|
static interface |
UpdateOperation.CellUpdateOperation<K extends java.lang.Comparable<K>,T>
A single cell transform.
|
static interface |
UpdateOperation.DoubleWriteOperationBuilder
A builder for a transform that writes a single double cell.
|
static interface |
UpdateOperation.IntWriteOperationBuilder
A builder for a transform that writes a single int cell.
|
static interface |
UpdateOperation.LongWriteOperationBuilder
A builder for a transform that writes a single long cell.
|
static interface |
UpdateOperation.WriteOperationBuilder<T>
A builder for a transform that writes a single cell.
|
Modifier and Type | Method and Description |
---|---|
static <K extends java.lang.Comparable<K>> |
allOf(java.util.List<? extends UpdateOperation.CellUpdateOperation<?,?>> transforms)
Creates a compound transform composed of the given individual cell mutations.
|
static <K extends java.lang.Comparable<K>> |
allOf(UpdateOperation.CellUpdateOperation<?,?>... transforms)
Creates a compound transform composed of the given individual cell mutations.
|
java.lang.Iterable<Cell<?>> |
apply(Record<K> t)
Applies this transform to the given record.
|
static <K extends java.lang.Comparable<K>> |
custom(java.util.function.Function<Record<K>,java.lang.Iterable<Cell<?>>> custom)
Creates a custom transform that applies the given user supplied function.
|
static <T,U,R> java.util.function.BiFunction<T,U,R> |
input(java.util.function.Function<T,R> function)
Creates a bi-function that returns the result of the first argument applied to the given function.
|
static <K extends java.lang.Comparable<K>> |
install(Cell<?>... cells)
Creates a transform that outputs the specified set of cells.
|
static <K extends java.lang.Comparable<K>> |
install(java.lang.Iterable<Cell<?>> cells)
Creates a transform that outputs the specified set of cells.
|
static <T,U,R> java.util.function.BiFunction<T,U,R> |
output(java.util.function.Function<U,R> function)
Creates a bi-function that returns the result of the second argument applied to the given function.
|
static <K extends java.lang.Comparable<K>,T> |
remove(CellDefinition<T> definition)
Create a transform that removes a cell.
|
static UpdateOperation.BoolWriteOperationBuilder |
write(BoolCellDefinition definition) |
static <K extends java.lang.Comparable<K>,T> |
write(Cell<T> cell)
Creates a transform that writes the given cell.
|
static <T> UpdateOperation.WriteOperationBuilder<T> |
write(CellDefinition<T> definition) |
static UpdateOperation.DoubleWriteOperationBuilder |
write(DoubleCellDefinition definition) |
static UpdateOperation.IntWriteOperationBuilder |
write(IntCellDefinition definition) |
static UpdateOperation.LongWriteOperationBuilder |
write(LongCellDefinition definition) |
static <K extends java.lang.Comparable<K>,T> |
write(java.lang.String cellName,
T value)
Creates a transform that writes a cell of the given name.
|
java.lang.Iterable<Cell<?>> apply(Record<K> t)
t
- the incoming recordstatic <K extends java.lang.Comparable<K>> UpdateOperation<K> install(Cell<?>... cells)
K
- consumed record key typecells
- cells to installstatic <K extends java.lang.Comparable<K>> UpdateOperation<K> install(java.lang.Iterable<Cell<?>> cells)
K
- consumed record key typecells
- a non-null
Iterable
supplying cells to installjava.lang.NullPointerException
- if cells
is null
static <K extends java.lang.Comparable<K>> UpdateOperation<K> custom(java.util.function.Function<Record<K>,java.lang.Iterable<Cell<?>>> custom)
K
- consumed record key typecustom
- user transform to executestatic <K extends java.lang.Comparable<K>> UpdateOperation<K> allOf(UpdateOperation.CellUpdateOperation<?,?>... transforms)
K
- consumed record key typetransforms
- list of transforms to performstatic <K extends java.lang.Comparable<K>> UpdateOperation<K> allOf(java.util.List<? extends UpdateOperation.CellUpdateOperation<?,?>> transforms)
K
- consumed record key typetransforms
- list of transforms to performstatic <T> UpdateOperation.WriteOperationBuilder<T> write(CellDefinition<T> definition)
static UpdateOperation.BoolWriteOperationBuilder write(BoolCellDefinition definition)
static UpdateOperation.IntWriteOperationBuilder write(IntCellDefinition definition)
static UpdateOperation.LongWriteOperationBuilder write(LongCellDefinition definition)
static UpdateOperation.DoubleWriteOperationBuilder write(DoubleCellDefinition definition)
static <K extends java.lang.Comparable<K>,T> UpdateOperation.CellUpdateOperation<K,T> write(Cell<T> cell)
K
- consumed record key typeT
- cell typecell
- the cell to writestatic <K extends java.lang.Comparable<K>,T> UpdateOperation.CellUpdateOperation<K,T> write(java.lang.String cellName, T value)
K
- consumed record key typeT
- cell typecellName
- cell namevalue
- cell valuestatic <K extends java.lang.Comparable<K>,T> UpdateOperation.CellUpdateOperation<K,T> remove(CellDefinition<T> definition)
K
- consumed record key typeT
- cell typedefinition
- cell definition to removestatic <T,U,R> java.util.function.BiFunction<T,U,R> input(java.util.function.Function<T,R> function)
T
- consumed input typeU
- unconsumed input typeR
- result typefunction
- mapping functionstatic <T,U,R> java.util.function.BiFunction<T,U,R> output(java.util.function.Function<U,R> function)
T
- unconsumed input typeU
- consumed input typeR
- result typefunction
- mapping function