visad.data.in
Class DoubleValueVetter

java.lang.Object
  extended byvisad.data.in.ValueProcessor
      extended byvisad.data.in.ValueVetter
          extended byvisad.data.in.DoubleValueVetter

final class DoubleValueVetter
extends ValueVetter

Provides support for verifying data values (i.e. seeing that they aren't equal to either of two special values).

Instances are immutable.


Field Summary
 
Fields inherited from class visad.data.in.ValueProcessor
trivialProcessor
 
Method Summary
(package private) static DoubleValueVetter doubleValueVetter(double value1, double value2)
          Returns an instance of this class corresponding to two special values.
 boolean equals(Object obj)
          Indicates if this instance is semantically identical to another object.
 int hashCode()
          Returns the hash code of this instance.
 double process(double value)
          Processes a value.
 double[] process(double[] values)
          Processes values.
 float process(float value)
          Processes a value.
 float[] process(float[] values)
          Processes values.
 
Methods inherited from class visad.data.in.ValueVetter
valueVetter
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

doubleValueVetter

static DoubleValueVetter doubleValueVetter(double value1,
                                           double value2)
Returns an instance of this class corresponding to two special values.

Parameters:
value1 - A special value.
value2 - The other special value.
Returns:
An instance of this class corresponding to the input arguments.

process

public float process(float value)
Processes a value.

Specified by:
process in class ValueProcessor
Parameters:
value - The value to be processed.
Returns:
If the value equals the special value, then Float.NaN; otherwise, the original value.

process

public double process(double value)
Processes a value.

Specified by:
process in class ValueProcessor
Parameters:
value - The value to be processed.
Returns:
If the value equals the special value, then Double.NaN; otherwise, the original value.

process

public float[] process(float[] values)
Processes values.

Specified by:
process in class ValueProcessor
Parameters:
values - The values to be processed.
Returns:
Vetted values (same array as input). If an element equals the special value, then that element is set to Float.NaN.

process

public double[] process(double[] values)
Processes values.

Specified by:
process in class ValueProcessor
Parameters:
values - The values to be processed.
Returns:
Vetted values (same array as input). If an element equals the special value, then that element is set to Double.NaN.

equals

public boolean equals(Object obj)
Indicates if this instance is semantically identical to another object.

Returns:
true if and only if this instance is semantically identical to the other object.

hashCode

public int hashCode()
Returns the hash code of this instance.

Returns:
The hash code of this instance.