visad.data.in
Class AndCondition

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

public class AndCondition
extends Condition

Provides support for complementary conditions for 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 AndCondition(Condition conditionA, Condition conditionB)
          Constructs from two, necessary conditions for a VisAD data object.
 
Method Summary
static AndCondition andCondition(Condition conditionA, Condition conditionB)
          Returns an instance of this class.
 boolean isSatisfied(DataImpl data)
          Indicates if a VisAD data object satisfies this condition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AndCondition

protected AndCondition(Condition conditionA,
                       Condition conditionB)
Constructs from two, necessary conditions for a VisAD data object. VisAD data objects that satisfy both conditions will satisfy this condition.

Parameters:
conditionA - A condition for a VisAD data object.
conditionB - A condition for a VisAD data object.
Method Detail

andCondition

public static AndCondition andCondition(Condition conditionA,
                                        Condition conditionB)
Returns an instance of this class. Constructs from two, necessary conditions for a VisAD data object. VisAD data objects that satisfy both conditions will satisfy this condition.

Parameters:
conditionA - A condition for a VisAD data object.
conditionB - A condition for a VisAD data object.
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 VisAD data object satisfies both the conditions used during this instance's construction.