net.sf.staccatocommons.check
Class Check.VarFailure

java.lang.Object
  extended by net.sf.staccatocommons.check.Check.Failure
      extended by net.sf.staccatocommons.check.Check.VarFailure
Enclosing class:
Check<ExceptionType extends Throwable>

public static class Check.VarFailure
extends Check.Failure

A check failure that contains the name and value of the variable that was checked

Author:
flbulgarelli

Constructor Summary
Check.VarFailure(String varName, Object var, String message)
          Creates a new Check.VarFailure
 
Method Summary
 String createMessage()
           
 String createSimpleMessage()
           
 Object getVar()
           
 String getVarName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Check.VarFailure

public Check.VarFailure(String varName,
                        Object var,
                        String message)
Creates a new Check.VarFailure

Parameters:
varName - the name of the variable checked
var - the variable checked
message - the failure message
Method Detail

getVar

public Object getVar()
Returns:
the var

getVarName

public String getVarName()
Returns:
the varName

createSimpleMessage

public String createSimpleMessage()
Returns:
the failure message, which does not contain the variable name nor value

createMessage

public String createMessage()
Overrides:
createMessage in class Check.Failure
Returns:
the failure message, which contains the variable name and value


Get Staccatocommons at SourceForge.net. Fast, secure and Free Open Source software downloads