jcreek.representation.constraints
Class ConstraintCheckResult

java.lang.Object
  extended byjcreek.representation.constraints.ConstraintCheckResult

public class ConstraintCheckResult
extends java.lang.Object

This object wraps the information returned by the constraints

Version:
1.0
Author:
Martin Stige

Constructor Summary
ConstraintCheckResult()
          No-argument constructor
ConstraintCheckResult(boolean ok, java.lang.String description)
          Creates a new instance of ConstraintCheckResult
 
Method Summary
 java.lang.String getDescription()
          Returns the explanation of the constraint check
 boolean isViolated()
          Returns true if the constraint is violated
 void setDescription(java.lang.String desc)
          Sets the explanation of the constraint check
 void setViolated(boolean viol)
          Sets whether the constraint is violated or not
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstraintCheckResult

public ConstraintCheckResult(boolean ok,
                             java.lang.String description)
Creates a new instance of ConstraintCheckResult

Parameters:
ok - whether the constraint are met or not
description - an explanation of the constraint violation

ConstraintCheckResult

public ConstraintCheckResult()
No-argument constructor

Method Detail

setDescription

public void setDescription(java.lang.String desc)
Sets the explanation of the constraint check

Parameters:
desc - the explanation

setViolated

public void setViolated(boolean viol)
Sets whether the constraint is violated or not

Parameters:
viol - true for violated, false for constraint met

isViolated

public boolean isViolated()
Returns true if the constraint is violated


getDescription

public java.lang.String getDescription()
Returns the explanation of the constraint check


toString

public java.lang.String toString()


Created at IDI, NTNU by the Artificial Intelligence and Learning group