Class ValidChunkDetector

java.lang.Object
noaa.coastwatch.util.chunk.ValidChunkDetector
All Implemented Interfaces:
ChunkVisitor

public class ValidChunkDetector extends Object implements 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 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

      public void visitByteChunk(ByteChunk chunk)
      Description copied from interface: ChunkVisitor
      Visits a chunk of native byte data.
      Specified by:
      visitByteChunk in interface ChunkVisitor
      Parameters:
      chunk - the byte chunk to visit.
    • visitShortChunk

      public void visitShortChunk(ShortChunk chunk)
      Description copied from interface: ChunkVisitor
      Visits a chunk of native short data.
      Specified by:
      visitShortChunk in interface ChunkVisitor
      Parameters:
      chunk - the short chunk to visit.
    • visitIntChunk

      public void visitIntChunk(IntChunk chunk)
      Description copied from interface: ChunkVisitor
      Visits a chunk of native int data.
      Specified by:
      visitIntChunk in interface ChunkVisitor
      Parameters:
      chunk - the int chunk to visit.
    • visitLongChunk

      public void visitLongChunk(LongChunk chunk)
      Description copied from interface: ChunkVisitor
      Visits a chunk of native long data.
      Specified by:
      visitLongChunk in interface ChunkVisitor
      Parameters:
      chunk - the long chunk to visit.
    • visitFloatChunk

      public void visitFloatChunk(FloatChunk chunk)
      Description copied from interface: ChunkVisitor
      Visits a chunk of native float data.
      Specified by:
      visitFloatChunk in interface ChunkVisitor
      Parameters:
      chunk - the float chunk to visit.
    • visitDoubleChunk

      public void visitDoubleChunk(DoubleChunk chunk)
      Description copied from interface: ChunkVisitor
      Visits a chunk of native double data.
      Specified by:
      visitDoubleChunk in interface ChunkVisitor
      Parameters:
      chunk - the double chunk to visit.