MPXJ: Microsoft Project Exchange

net.sf.mpxj
Class GenericCriteria

Package class diagram package GenericCriteria
java.lang.Object
  extended by net.sf.mpxj.GenericCriteria
Direct Known Subclasses:
FilterCriteria, GraphicalIndicatorCriteria

public abstract class GenericCriteria
extends java.lang.Object

This class represents the criteria used as part of an evaluation.


Constructor Summary
GenericCriteria(ProjectFile projectFile)
          Constructor.
 
Method Summary
protected  boolean evaluateCriteria(FieldContainer container)
          Evaluate the criteria and return a boolean result.
 FieldType getField()
          Retrieves the field used as the RHS of the expression.
 TestOperator getOperator()
          Retrieve the operator used in the test.
 java.lang.Object getValue(int index)
          Retrieve the first value.
 void setField(FieldType field)
          Sets the field used as the LHS of the expression.
 void setOperator(TestOperator operator)
          Set the operator used in the test.
 void setValue(int index, java.lang.Object value)
          Add the value to list of values to be used as part of the evaluation of this indicator.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenericCriteria

public GenericCriteria(ProjectFile projectFile)
Constructor.

Parameters:
projectFile - parent project file
Method Detail

setField

public void setField(FieldType field)
Sets the field used as the LHS of the expression.

Parameters:
field - field type

getField

public FieldType getField()
Retrieves the field used as the RHS of the expression.

Returns:
field type

getOperator

public TestOperator getOperator()
Retrieve the operator used in the test.

Returns:
test operator

setOperator

public void setOperator(TestOperator operator)
Set the operator used in the test.

Parameters:
operator - test operator

setValue

public void setValue(int index,
                     java.lang.Object value)
Add the value to list of values to be used as part of the evaluation of this indicator.

Parameters:
index - position in the list
value - evaluation value

getValue

public java.lang.Object getValue(int index)
Retrieve the first value.

Parameters:
index - position in the list
Returns:
first value

evaluateCriteria

protected boolean evaluateCriteria(FieldContainer container)
Evaluate the criteria and return a boolean result.

Parameters:
container - field container
Returns:
boolean flag

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object


Copyright © 2000-2009 Packwood Software. All Rights Reserved.