Class ChunkDataFlagger

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

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

      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.