Package noaa.coastwatch.util.chunk
Class ChunkDataFlagger
java.lang.Object
noaa.coastwatch.util.chunk.ChunkDataFlagger
- All Implemented Interfaces:
ChunkVisitor
The
ChunkDataFlagger
class is a visitor that modifies
any type of DataChunk
instance by flagging specific
data values as missing. To use a flagger object, call setMissingData(boolean[])
to pass an array of flag values to use, then pass the flagger object as a visitor
to a DataChunk
instance. If the chunk has no associated missing
value, or the flag array has not been set, the data is not modified.- Since:
- 3.5.0
- Author:
- Peter Hollemans
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setMissingData
(boolean[] isMissingArray) Sets the missing data array.void
visitByteChunk
(ByteChunk chunk) Visits a chunk of native byte data.void
visitDoubleChunk
(DoubleChunk chunk) Visits a chunk of native double data.void
visitFloatChunk
(FloatChunk chunk) Visits a chunk of native float data.void
visitIntChunk
(IntChunk chunk) Visits a chunk of native int data.void
visitLongChunk
(LongChunk chunk) Visits a chunk of native long data.void
visitShortChunk
(ShortChunk chunk) Visits a chunk of native short data.
-
Constructor Details
-
ChunkDataFlagger
public ChunkDataFlagger()
-
-
Method Details
-
setMissingData
public void setMissingData(boolean[] isMissingArray) Sets the missing data array.- Parameters:
isMissingArray
- the array of missing value flags. For each entry that is true in the array, the corresponding value in the chunk is set to missing when the visitor is accepted.
-
visitByteChunk
Description copied from interface:ChunkVisitor
Visits a chunk of native byte data.- Specified by:
visitByteChunk
in interfaceChunkVisitor
- Parameters:
chunk
- the byte chunk to visit.
-
visitShortChunk
Description copied from interface:ChunkVisitor
Visits a chunk of native short data.- Specified by:
visitShortChunk
in interfaceChunkVisitor
- Parameters:
chunk
- the short chunk to visit.
-
visitIntChunk
Description copied from interface:ChunkVisitor
Visits a chunk of native int data.- Specified by:
visitIntChunk
in interfaceChunkVisitor
- Parameters:
chunk
- the int chunk to visit.
-
visitLongChunk
Description copied from interface:ChunkVisitor
Visits a chunk of native long data.- Specified by:
visitLongChunk
in interfaceChunkVisitor
- Parameters:
chunk
- the long chunk to visit.
-
visitFloatChunk
Description copied from interface:ChunkVisitor
Visits a chunk of native float data.- Specified by:
visitFloatChunk
in interfaceChunkVisitor
- Parameters:
chunk
- the float chunk to visit.
-
visitDoubleChunk
Description copied from interface:ChunkVisitor
Visits a chunk of native double data.- Specified by:
visitDoubleChunk
in interfaceChunkVisitor
- Parameters:
chunk
- the double chunk to visit.
-