org.mockcentral.editor.nodes.problem
Class NodeProblem

java.lang.Object
  extended by org.mockcentral.editor.nodes.problem.NodeProblem

public class NodeProblem
extends java.lang.Object

A class defining a problem associated with a MockCentralNode. Instances are generated during the node-building process and store data specifying details about the problem and a reference to the node itself.

Author:
David Hutchinson

Constructor Summary
NodeProblem()
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 NodeProblemCategory getCategory()
          Returns the NodeProblemCategory.
 int getElementIndex()
          Returns the index of the element in which the problem exists within its enclosing group.
 java.lang.String getElementName()
          Returns the type name of the element in which the problem exists, ie "methodParam", "expectedResult", etc.
 long getId()
          Returns the id.
 java.lang.String getMessage()
          Returns the problem message.
 MockCentralNode getNode()
          Returns the MockCentralNode.
 int hashCode()
           
 void setCategory(NodeProblemCategory category)
          Sets the NodeProblemCategory.
 void setElementIndex(int elementIndex)
          Sets the index of the element in which the problem exists within its enclosing group.
 void setElementName(java.lang.String elementName)
          Sets the type name of the element in which the problem exists, ie "methodParam", "expectedResult", etc.
 void setId(long id)
          Sets the id.
 void setMessage(java.lang.String message)
          Sets the problem message.
 void setNode(MockCentralNode node)
          Sets the MockCentralNode.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeProblem

public NodeProblem()
Method Detail

getCategory

public NodeProblemCategory getCategory()
Returns the NodeProblemCategory.

Returns:
the NodeProblemCategory.

setCategory

public void setCategory(NodeProblemCategory category)
Sets the NodeProblemCategory.

Parameters:
category - the NodeProblemCategory to set.

getId

public long getId()
Returns the id.

Returns:
the id.

setId

public void setId(long id)
Sets the id.

Parameters:
id - the id to set.

getNode

public MockCentralNode getNode()
Returns the MockCentralNode.

Returns:
the MockCentralNode.

setNode

public void setNode(MockCentralNode node)
Sets the MockCentralNode.

Parameters:
node - MockCentralNode the node to set.

getMessage

public java.lang.String getMessage()
Returns the problem message.

Returns:
the problem message.

setMessage

public void setMessage(java.lang.String message)
Sets the problem message.

Parameters:
message - the problem message to set.

getElementName

public java.lang.String getElementName()
Returns the type name of the element in which the problem exists, ie "methodParam", "expectedResult", etc.

Returns:
the element name.

setElementName

public void setElementName(java.lang.String elementName)
Sets the type name of the element in which the problem exists, ie "methodParam", "expectedResult", etc.

Parameters:
elementName - the element name to set.

getElementIndex

public int getElementIndex()
Returns the index of the element in which the problem exists within its enclosing group. For instance, if the problem refers to a constructor argument parameter, this will be the index of that argument within the arguments list.

Returns:
the element index.

setElementIndex

public void setElementIndex(int elementIndex)
Sets the index of the element in which the problem exists within its enclosing group. For instance, if the problem refers to a constructor argument parameter, this will be the index of that argument within the arguments list.

Parameters:
elementIndex - the element index to set.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object