antsnest.datastructure
Class CannotAddNodeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by antsnest.datastructure.CannotAddNodeException
All Implemented Interfaces:
Serializable

public class CannotAddNodeException
extends Exception

An exception that indicates an attempt was made to add a node somewhere it shouldn't go

Author:
Chris Clohosy
See Also:
Serialized Form

Field Summary
static int ANT_NODE_TEXT_ADD_MISUSE
          Constant representing an AntNodeText tried to be added
static int ANT_PROJECT_ADD_MISUSE
          Constant representing an AntProject tried to be added
static int ANT_TARGET_ADD_MISUSE
          Constant representing an AntTarget tried to be added somewhere else than an AntProject
 
Constructor Summary
CannotAddNodeException(int problem)
          Constructs the exception
 
Method Summary
 int getProblem()
          Gets what the problem was
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ANT_PROJECT_ADD_MISUSE

public static final int ANT_PROJECT_ADD_MISUSE
Constant representing an AntProject tried to be added

See Also:
Constant Field Values

ANT_TARGET_ADD_MISUSE

public static final int ANT_TARGET_ADD_MISUSE
Constant representing an AntTarget tried to be added somewhere else than an AntProject

See Also:
Constant Field Values

ANT_NODE_TEXT_ADD_MISUSE

public static final int ANT_NODE_TEXT_ADD_MISUSE
Constant representing an AntNodeText tried to be added

See Also:
Constant Field Values
Constructor Detail

CannotAddNodeException

public CannotAddNodeException(int problem)
Constructs the exception

Parameters:
problem - the code to what the problem was
Method Detail

getProblem

public int getProblem()
Gets what the problem was

Returns:
an int, the problem code