de.tuberlin.cs.cis.ocl.eval.report
Class ConstraintSummary

java.lang.Object
  |
  +--de.tuberlin.cs.cis.ocl.eval.report.ConstraintSummary

public class ConstraintSummary
extends java.lang.Object

Summarises the results obtained from evaluating a constraint.

Author:
fchabar

Field Summary
static java.lang.String NOT_SATISFIED
          Constant describing that a constraint is not satisified
static java.lang.String SATISIFIED
          Constant describing that a constraint is satisified
static java.lang.String UNDEFINED
          Constant describing that a constraint is undefined
 
Constructor Summary
ConstraintSummary(de.tuberlin.cs.cis.ocl.parser.node.AConstraintContextBodypart constraint)
          Constructs a constraint summary.
 
Method Summary
 void addResult(ConstraintParameter params, java.lang.String evaluation)
          Adds an value to the list of results the constraint is evaluated to.
 java.util.Set getAllParameters()
          Returns all parameters the summarized constriant has been parameterized with.
 java.util.Collection getAllResults()
          Returns all results the summarized constriant is evaluated to.
 java.lang.String getConstraint()
          Returns the String describing an OCL constraint.
 java.lang.String getResult(ConstraintParameter params)
          Retruns the result the summarized constraint is evaluated to when parameterized with the specified arguments.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SATISIFIED

public static final java.lang.String SATISIFIED
Constant describing that a constraint is satisified

See Also:
Constant Field Values

NOT_SATISFIED

public static final java.lang.String NOT_SATISFIED
Constant describing that a constraint is not satisified

See Also:
Constant Field Values

UNDEFINED

public static final java.lang.String UNDEFINED
Constant describing that a constraint is undefined

See Also:
Constant Field Values
Constructor Detail

ConstraintSummary

public ConstraintSummary(de.tuberlin.cs.cis.ocl.parser.node.AConstraintContextBodypart constraint)
Constructs a constraint summary.

Method Detail

getConstraint

public java.lang.String getConstraint()
Returns the String describing an OCL constraint.

Returns:
an OCL constraint

addResult

public void addResult(ConstraintParameter params,
                      java.lang.String evaluation)
Adds an value to the list of results the constraint is evaluated to.

Parameters:
params - the argument the constraint's expression is evaluated for
evaluation - the result the constraint's expression is evaluted to

getResult

public java.lang.String getResult(ConstraintParameter params)
Retruns the result the summarized constraint is evaluated to when parameterized with the specified arguments.

Parameters:
params - the arguments the constraint's expression is evaluated with
Returns:
the result of evaluating the constraint's expression with the specified arguments.

getAllResults

public java.util.Collection getAllResults()
Returns all results the summarized constriant is evaluated to.

Returns:
all results the summarized constriant is evaluated to

getAllParameters

public java.util.Set getAllParameters()
Returns all parameters the summarized constriant has been parameterized with.

Returns:
all parameters the summarized constriant has been parameterized with

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object