fishPond
Class IllegalPlantPositionException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by fishPond.IllegalPlantPositionException
All Implemented Interfaces:
java.io.Serializable

public class IllegalPlantPositionException
extends java.lang.RuntimeException

Thrown when a plant is positioned in a way that doesn't make sense (either above another plant, or over a rock.)

Author:
Fawzi Emad
See Also:
Serialized Form

Field Summary
static int PLANT_OVER_ROCK
           
static int TWO_PLANTS_IN_ONE_PLACE
           
 
Constructor Summary
IllegalPlantPositionException(int code)
           
 
Method Summary
 int getCode()
           
 java.lang.String getMessage()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TWO_PLANTS_IN_ONE_PLACE

public static final int TWO_PLANTS_IN_ONE_PLACE
See Also:
Constant Field Values

PLANT_OVER_ROCK

public static final int PLANT_OVER_ROCK
See Also:
Constant Field Values
Constructor Detail

IllegalPlantPositionException

public IllegalPlantPositionException(int code)
Parameters:
code - either TWO_PLANTS_IN_ONE_PLACE, or PLANT_OVER_ROCK
Method Detail

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable

getCode

public int getCode()


Web Accessibility