V - The type of volume being worked onpublic interface BlockVolumeWorker<V extends BlockVolume>
| Modifier and Type | Method and Description |
|---|---|
V |
getVolume()
Returns the volume this worker operates on.
|
void |
iterate(BlockVolumeVisitor<V> visitor)
Iterates this block volume, calling the visitor on each coordinate
triplet.
|
void |
map(BlockVolumeMapper mapper,
MutableBlockVolume destination)
Applies a mapping operation to all the blocks in the volume and saves the
results to the destination volume.
|
void |
merge(BlockVolume second,
BlockVolumeMerger merger,
MutableBlockVolume destination)
Applies a merging operation to the blocks of the operating volume and an
external one.
|
<T> T |
reduce(BlockVolumeReducer<T> reducer,
BiFunction<T,T,T> merge,
T identity)
Applies a reduction operation to the volume.
|
V getVolume()
void map(BlockVolumeMapper mapper, MutableBlockVolume destination)
mapper - The mapping operationdestination - The destination volumevoid merge(BlockVolume second, BlockVolumeMerger merger, MutableBlockVolume destination)
second - The volume to merge withmerger - The merging operationdestination - The destination volumevoid iterate(BlockVolumeVisitor<V> visitor)
visitor - The visitor<T> T reduce(BlockVolumeReducer<T> reducer, BiFunction<T,T,T> merge, T identity)
T - The type of the reductionreducer - The reducing operationmerge - Merges two reductions into oneidentity - The identity of the operation