csheets.ext.test
Class TestCaseParam

java.lang.Object
  extended by csheets.core.formula.Literal
      extended by csheets.ext.test.TestCaseParam
All Implemented Interfaces:
Expression, Serializable

public class TestCaseParam
extends Literal
implements Serializable

A class holding information about a Test Case Parameter. It contains the value of the parameter.

Author:
Staffan Gustafsson, Jens Schou
See Also:
Serialized Form

Nested Class Summary
static class TestCaseParam.Type
          The test case parameters origin can be either user entered, system generated within the cells assertion or derived from the values of its test cases
 
Constructor Summary
TestCaseParam(TestableCell cell, Value value, TestCaseParam.Type type)
          Creates the Test Case Parameter.
 
Method Summary
 boolean equals(Object other)
          Returns whether the other object has the same value and type as this has.
 TestableCell getCell()
          Returns the Test Case Parameters cells address.
 int hashCode()
          Returns the hash code of the test case parameter.
 boolean hasNoType()
           
 boolean hasType(TestCaseParam.Type type)
           
 boolean isDerived()
           
 boolean isSystemGenerated()
           
 boolean isUserEntered()
           
 void setType(TestCaseParam.Type type, boolean toggle)
           
 String toString2()
           
 
Methods inherited from class csheets.core.formula.Literal
accept, evaluate, getValue, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestCaseParam

public TestCaseParam(TestableCell cell,
                     Value value,
                     TestCaseParam.Type type)
Creates the Test Case Parameter.

Parameters:
cell - the cell to which the parameter belongs
value - the value of the parameter.
type - the origin of the test case parameter
Method Detail

getCell

public TestableCell getCell()
Returns the Test Case Parameters cells address.

Returns:
The Test Case Parameters cells address.

hasType

public boolean hasType(TestCaseParam.Type type)

setType

public void setType(TestCaseParam.Type type,
                    boolean toggle)

hasNoType

public boolean hasNoType()

isUserEntered

public boolean isUserEntered()

isSystemGenerated

public boolean isSystemGenerated()

isDerived

public boolean isDerived()

toString2

public String toString2()

equals

public boolean equals(Object other)
Returns whether the other object has the same value and type as this has. Could also check against address but that seems unecessary since TCPs are stored on the cell they belong to, and this way you can compare TCP's from different cells if you want.

Overrides:
equals in class Object
Parameters:
other - the object to check for equality
Returns:
true if the objects are equal

hashCode

public int hashCode()
Returns the hash code of the test case parameter.

Overrides:
hashCode in class Object
Returns:
the hash code of the test case parameter.