net.pacbell.jfai.toh.domain
Class InvalidMoveException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by net.pacbell.jfai.toh.domain.AbstractException
              extended by net.pacbell.jfai.toh.domain.InvalidMoveException
All Implemented Interfaces:
Serializable

public class InvalidMoveException
extends AbstractException

An instance of this class is thrown if an invalid move is detected.

See Also:
Serialized Form

Constructor Summary
InvalidMoveException(Disk culprit, Disk receiver, Pin pin)
          Creates an instance with the given arguments.
 
Method Summary
 Disk getCulprit()
          Gets the culprit.
 Pin getPin()
          Gets the pin.
 Disk getReceiver()
          Gets the receiver.
 
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
 

Constructor Detail

InvalidMoveException

public InvalidMoveException(Disk culprit,
                            Disk receiver,
                            Pin pin)
Creates an instance with the given arguments.

Parameters:
culprit - the disk that caused the exception
receiver - the receiving disk
pin - the pin where the exception occurred
Method Detail

getCulprit

public Disk getCulprit()
Gets the culprit.

Returns:
the disk that caused the exception

getPin

public Pin getPin()
Gets the pin.

Returns:
the pin where the exception occurred

getReceiver

public Disk getReceiver()
Gets the receiver.

Returns:
the receiving disk