visad.data.in
Class ValueUnpacker

java.lang.Object
  extended by visad.data.in.ValueProcessor
      extended by visad.data.in.ValueUnpacker
Direct Known Subclasses:
OffsetUnpacker, ScaleAndOffsetUnpacker, ScaleUnpacker

public abstract class ValueUnpacker
extends ValueProcessor

Provides support for unpacking data values (i.e. converting them from smaller types to bigger types).

Instances are immutable.

Author:
Steven R. Emmerson

Field Summary
 
Fields inherited from class visad.data.in.ValueProcessor
trivialProcessor
 
Constructor Summary
protected ValueUnpacker()
          Constructs from nothing.
 
Method Summary
 double getIncrement()
          Returns the minimum, potential increment between numeric values.
static ValueUnpacker valueUnpacker()
          Returns the trivial value unpacker.
 
Methods inherited from class visad.data.in.ValueProcessor
process, process, process, process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueUnpacker

protected ValueUnpacker()
Constructs from nothing.

Method Detail

valueUnpacker

public static ValueUnpacker valueUnpacker()
Returns the trivial value unpacker. The trivial value unpacker does nothing to the value during processing and its getIncrement() method returns NaN.

Returns:
The trivial value unpacker.

getIncrement

public double getIncrement()
Returns the minimum, potential increment between numeric values. Typically, this is the absolute magnitude of a "scale factor" attribute. If the increment is undefined or not applicable, then Double.NaN is returned. This method should be overridden in appropriate subclasses.

Returns:
Double.NaN.