K - Key type.V - Value type.@Experimental public class Apply<K,V> extends Object implements PostProcessingOperation<K,V>
APPLY can perform arithmetic operations on numeric properties or apply functions depending on property types.
{
@code
// Calculate total value from price and quantity
Apply totalValue = Apply.of("@price * @quantity", "total_value");
// Mathematical operations
Apply discount = Apply.of("@price * 0.9", "discounted_price");
}
PostProcessingOperation| Constructor and Description |
|---|
Apply(V expression,
K name)
Creates a new APPLY operation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
build(CommandArgs<K,V> args)
Build the operation arguments into the command args.
|
static <K,V> Apply<K,V> |
of(V expression,
K name)
Static factory method to create an Apply instance.
|
public static <K,V> Apply<K,V> of(V expression, K name)
K - Key typeV - Value typeexpression - the expression to applyname - the name of the result fieldpublic void build(CommandArgs<K,V> args)
PostProcessingOperationbuild in interface PostProcessingOperation<K,V>args - the command args to build intoCopyright © 2026 lettuce.io. All rights reserved.