Package noaa.coastwatch.util.chunk
Class SyntheticIntChunkProducer
java.lang.Object
noaa.coastwatch.util.chunk.SyntheticIntChunkProducer
- All Implemented Interfaces:
ChunkProducer
A
SyntheticIntChunkProducer
object creates 2D integer data
chunks whose values are specified by a functional interface method that
returns an integer value for each row and column in the chunk.- Since:
- 3.5.0
- Author:
- Peter Hollemans
-
Constructor Summary
ConstructorDescriptionSyntheticIntChunkProducer
(ChunkingScheme scheme, IntBinaryOperator function) Creates a new producer. -
Method Summary
Modifier and TypeMethodDescriptiongetChunk
(ChunkPosition pos) Produces a data chunk.Gets the external type of chunks produced by this producer.Gets the native chunking scheme for chunks obtained from this producer.Gets a prototype chunk for this producer.
-
Constructor Details
-
SyntheticIntChunkProducer
Creates a new producer.- Parameters:
scheme
- the chunking scheme to use for this producer.function
- the integer function for this producer that maps (row, column) to an int value.
-
-
Method Details
-
getExternalType
Description copied from interface:ChunkProducer
Gets the external type of chunks produced by this producer.- Specified by:
getExternalType
in interfaceChunkProducer
- Returns:
- the external data type.
- See Also:
-
getChunk
Description copied from interface:ChunkProducer
Produces a data chunk.- Specified by:
getChunk
in interfaceChunkProducer
- Parameters:
pos
- the position of the data chunk to produce.- Returns:
- the data chunk.
-
getNativeScheme
Description copied from interface:ChunkProducer
Gets the native chunking scheme for chunks obtained from this producer. Calls toChunkProducer.getChunk(noaa.coastwatch.util.chunk.ChunkPosition)
are optimized to use chunk positions obtained from the native scheme.- Specified by:
getNativeScheme
in interfaceChunkProducer
- Returns:
- the native chunking scheme used by this producer, or null if no native chunking scheme is used.
-
getPrototypeChunk
Description copied from interface:ChunkProducer
Gets a prototype chunk for this producer. Chunks received from theChunkProducer.getChunk(noaa.coastwatch.util.chunk.ChunkPosition)
method conform to the prototype.- Specified by:
getPrototypeChunk
in interfaceChunkProducer
- Returns:
- a prototype chunk for chunks produced by this producer.
-