com.cafesoft.cams.attr
Class MatchResult

java.lang.Object
  |
  +--com.cafesoft.cams.attr.MatchResult

public class MatchResult
extends Object

MatchResult communicates whether a given AttributeMatch matches an input request, does not match an input request, or the result is indeterminate.

Since:
5/5/2004

Field Summary
static int INDETERMINATE
          An integer value indicating the the result is Indeterminate
static int MATCH
          An integer value indicating the the target matches the request
static MatchResult MATCH_RESULT_MATCH
          Standard MatchResult instance for a MATCH.
static MatchResult MATCH_RESULT_NO_MATCH
          Standard MatchResult instance for a NO_MATCH.
static int NO_MATCH
          An integer value indicating that the target doesn't match the request
 
Constructor Summary
MatchResult(int result)
          Creates a MatchResult with no Status
MatchResult(int result, EvaluationStatus evalStatus)
          Creates a MatchResult, including EvaluationStatus
 
Method Summary
 EvaluationStatus getEvaluationStatus()
          Returns the evaluation status if there was an error, or null if no error occurred
 int getResult()
          Returns the applicable result
 String toString()
          Return a String representation of this MatchResult.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MATCH

public static final int MATCH
An integer value indicating the the target matches the request

See Also:
Constant Field Values

NO_MATCH

public static final int NO_MATCH
An integer value indicating that the target doesn't match the request

See Also:
Constant Field Values

INDETERMINATE

public static final int INDETERMINATE
An integer value indicating the the result is Indeterminate

See Also:
Constant Field Values

MATCH_RESULT_MATCH

public static final MatchResult MATCH_RESULT_MATCH
Standard MatchResult instance for a MATCH.


MATCH_RESULT_NO_MATCH

public static final MatchResult MATCH_RESULT_NO_MATCH
Standard MatchResult instance for a NO_MATCH.

Constructor Detail

MatchResult

public MatchResult(int result)
Creates a MatchResult with no Status

Parameters:
result - the match result as an integer value

MatchResult

public MatchResult(int result,
                   EvaluationStatus evalStatus)
            throws IllegalArgumentException
Creates a MatchResult, including EvaluationStatus

Parameters:
result - the match result as an integer value
evalStatus - the error information
Throws:
IllegalArgumentException - if the input result isn't a valid value
Method Detail

getResult

public int getResult()
Returns the applicable result

Returns:
the applicable result

getEvaluationStatus

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

Returns:
the error EvaluationStatus or null

toString

public String toString()
Return a String representation of this MatchResult.

Overrides:
toString in class Object


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