Package noaa.coastwatch.util.chunk
Class ValidChunkDetector
java.lang.Object
noaa.coastwatch.util.chunk.ValidChunkDetector
- All Implemented Interfaces:
ChunkVisitor
The
ValidChunkDetector
class is a visitor that checks data
chunks for missing values to determine if all the chunk's data values are
missing, or if the chunk contains some valid data. To use, pass a detector
object as a visitor to a DataChunk
instance and then call the
isValid
method.- Since:
- 3.5.0
- Author:
- Peter Hollemans
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isValid()
Gets the valid flag value.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
-
ValidChunkDetector
public ValidChunkDetector()
-
-
Method Details
-
isValid
public boolean isValid()Gets the valid flag value.- Returns:
- true if at least some of the data in the visited chunk is not set to the missing value.
-
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.
-