地图
地图 (Map) 会进行一对一的录制。
Redis 堆栈 |
---|
public <I extends java.io.Serializable> GearsBuilder<I> map(
gears.operations.MapOperation<T,I> mapper)
Maps each input record in the pipe to an output record, one-to-one.
Parameters
Type parameters:
Name
Description
I
The template type of the returned builder
Function parameters:
Name
Type
Description
mapper
MapOperation<T,I>
For each input record, returns a new output record
Returns
Returns a GearsBuilder object with a new template type.
Example
Map each record to its string value:
GearsBuilder.CreateGearsBuilder(reader).
map(r->{
return r.getStringVal();
});
On this page