visad.data.in
Class MultipleValueVetter

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

final class MultipleValueVetter
extends ValueVetter

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

Instances are immutable.


Field Summary
 
Fields inherited from class visad.data.in.ValueProcessor
trivialProcessor
 
Method Summary
 boolean equals(Object obj)
          Indicates if this instance is semantically identical to another object.
 int hashCode()
          Returns the hash code of this instance.
(package private) static MultipleValueVetter multipleValueVetter(double[] values)
          Returns an instance of this class corresponding to special values.
 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

multipleValueVetter

static MultipleValueVetter multipleValueVetter(double[] values)
Returns an instance of this class corresponding to special values.

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 one of the special values, 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 one of the special values, 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 one of the special values, 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 one of the special values, then that element is set to Float.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.