com.cafesoft.cams.attr
Class StandardEvaluationResult

java.lang.Object
  |
  +--com.cafesoft.cams.attr.StandardEvaluationResult
All Implemented Interfaces:
EvaluationResult

public class StandardEvaluationResult
extends Object
implements EvaluationResult

StandardEvaluationResult implements the standard Cams result for an evaluated Evaluatable object.

Since:
4/23/2004

Constructor Summary
StandardEvaluationResult(AttributeValue value)
          Create an EvaluationResult containing a single AttributeValue.
StandardEvaluationResult(EvaluationStatus status)
          Constructor that creates an EvaluationResult of Indeterminate, including Status data.
 
Method Summary
 AttributeValue getAttributeValue()
          Returns the attribute value.
 EvaluationStatus getEvaluationStatus()
          Returns the status if there was an error, or null it no error occurred
static EvaluationResult getInstance(boolean value)
          Returns an EvaluationResult representing the specified boolean value.
 boolean indeterminate()
          Returns true if the result was indeterminate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardEvaluationResult

public StandardEvaluationResult(AttributeValue value)
Create an EvaluationResult containing a single AttributeValue.

Parameters:
value - the attribute value

StandardEvaluationResult

public StandardEvaluationResult(EvaluationStatus status)
Constructor that creates an EvaluationResult of Indeterminate, including Status data.

Parameters:
status - the error information
Method Detail

indeterminate

public boolean indeterminate()
Returns true if the result was indeterminate

Specified by:
indeterminate in interface EvaluationResult
Returns:
true if a result could not be evaluated because there was an error

getAttributeValue

public AttributeValue getAttributeValue()
Returns the attribute value.

Specified by:
getAttributeValue in interface EvaluationResult
Returns:
the attribute value or null if there was an error.

getEvaluationStatus

public EvaluationStatus getEvaluationStatus()
Returns the status if there was an error, or null it no error occurred

Specified by:
getEvaluationStatus in interface EvaluationResult
Returns:
the status or null

getInstance

public static EvaluationResult getInstance(boolean value)
Returns an EvaluationResult representing the specified boolean value.

Parameters:
value - a boolean representing the desired value
Returns:
an EvaluationResult representing the specified boolean value


Generated on 5:16:42 PM May 12, 2008, © 1996-2005 Cafésoft LLC. All rights reserved.