org.jtestcase.core.model
Class ParamInstance

java.lang.Object
  extended by org.jtestcase.core.model.ParamInstance
All Implemented Interfaces:
AbstractType

public class ParamInstance
extends java.lang.Object
implements AbstractType

Represents an param tag from the JTestCaseWizard XML.

Author:
Fausto Lelli $Id: ParamInstance.java,v 1.1 2005/10/12 20:20:08 faustothegrey Exp $

Constructor Summary
ParamInstance(java.lang.String content, java.lang.String name, java.lang.String type, java.lang.String key_type, java.lang.String value_type)
          Standard constructor.
 
Method Summary
 void addParam(ParamInstance nestedInstance)
          Adds a nested param instance to the list of nested instances
 boolean equals(ParamInstance anotherParamInstance)
          two paramInstances should be considered equal if their fields are equal name field is case sensitive type field is not case sensitive ( to review ) content field is case sensitive note: this function does NOT check for the nested param istances
 java.lang.String getContent()
          Returns the content of the param or assert element
 java.lang.String getKey_type()
          Returns the type of the keys for complex types in param or assert elements
 java.lang.String getName()
          Returns the name of the param or assert
 java.util.List getNestedInstances()
          Returns the list of nested instances in the param or assert
 java.lang.String getType()
          Returns the type of the param or assert
 java.lang.String getValue_type()
          Returns the type of the value for complex types in param or assert elements
 void setContent(java.lang.String content)
          Sets the content of the param element
 void setName(java.lang.String name)
          Sets the name of the param
 void setType(java.lang.String type)
          Sets the type of the param
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParamInstance

public ParamInstance(java.lang.String content,
                     java.lang.String name,
                     java.lang.String type,
                     java.lang.String key_type,
                     java.lang.String value_type)
Standard constructor. Sets all internal members.

Parameters:
name - the name of the param
type - the type of the param
content - the content of the param element
key_type - the type of the keys for complex types in param elements
value_type - the type of the value for complex types in param elements
Method Detail

setName

public void setName(java.lang.String name)
Sets the name of the param

Parameters:
name - the name of the param

setType

public void setType(java.lang.String type)
Sets the type of the param

Parameters:
type - the type of the param

setContent

public void setContent(java.lang.String content)
Sets the content of the param element

Parameters:
content - the content of the param element

getKey_type

public java.lang.String getKey_type()
Description copied from interface: AbstractType
Returns the type of the keys for complex types in param or assert elements

Specified by:
getKey_type in interface AbstractType
Returns:
the type of the keys for complex types in param or assert elements
See Also:
AbstractType.getKey_type()

getValue_type

public java.lang.String getValue_type()
Description copied from interface: AbstractType
Returns the type of the value for complex types in param or assert elements

Specified by:
getValue_type in interface AbstractType
Returns:
the type of the value for complex types in param or assert elements
See Also:
AbstractType.getValue_type()

getName

public java.lang.String getName()
Description copied from interface: AbstractType
Returns the name of the param or assert

Specified by:
getName in interface AbstractType
Returns:
the name of the param or assert
See Also:
AbstractType.getName()

getType

public java.lang.String getType()
Description copied from interface: AbstractType
Returns the type of the param or assert

Specified by:
getType in interface AbstractType
Returns:
the type of the param or assert
See Also:
AbstractType.getType()

getContent

public java.lang.String getContent()
Description copied from interface: AbstractType
Returns the content of the param or assert element

Specified by:
getContent in interface AbstractType
Returns:
the content of the param or assert element
See Also:
AbstractType.getContent()

addParam

public void addParam(ParamInstance nestedInstance)
Adds a nested param instance to the list of nested instances

Parameters:
nestedInstance - an param instance

getNestedInstances

public java.util.List getNestedInstances()
Description copied from interface: AbstractType
Returns the list of nested instances in the param or assert

Specified by:
getNestedInstances in interface AbstractType
Returns:
the list of nested instances in the param or assert
See Also:
AbstractType.getNestedInstances()

equals

public boolean equals(ParamInstance anotherParamInstance)
two paramInstances should be considered equal if their fields are equal name field is case sensitive type field is not case sensitive ( to review ) content field is case sensitive note: this function does NOT check for the nested param istances

Parameters:
anotherParamInstance -
Returns:
boolean

toString

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