visad.data.in
Class MathTypeCondition

java.lang.Object
  extended by visad.data.in.Condition
      extended by visad.data.in.MathTypeCondition

public class MathTypeCondition
extends Condition

Provides support for matching the MathType of a VisAD data object.

Instances are immutable.

Author:
Steven R. Emmerson

Field Summary
 
Fields inherited from class visad.data.in.Condition
TRIVIAL_CONDITION
 
Constructor Summary
protected MathTypeCondition(MathType mathType)
          Constructs from a VisAD math-type.
 
Method Summary
 boolean isSatisfied(DataImpl data)
          Indicates if a VisAD data object satisfies this condition.
static MathTypeCondition mathTypeCondition(MathType mathType)
          Returns an instance of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MathTypeCondition

protected MathTypeCondition(MathType mathType)
Constructs from a VisAD math-type. VisAD data objects whose math-type equals the given one will satisfy this condition.

Parameters:
mathType - The VisAD math-type to match against VisAD data objects.
Method Detail

mathTypeCondition

public static MathTypeCondition mathTypeCondition(MathType mathType)
Returns an instance of this class. Constructs from a VisAD math-type. VisAD data objects whose math-type equals the given one will satisfy this condition.

Parameters:
mathType - The VisAD math-type to match against VisAD data objects.
Returns:
An instance of this class.

isSatisfied

public boolean isSatisfied(DataImpl data)
Indicates if a VisAD data object satisfies this condition.

Specified by:
isSatisfied in class Condition
Parameters:
data - A VisAD data object.
Returns:
true if and only if the math-type of the VisAD data object equals the math-type used during this instance's construction.