au.com.prunge.jgenfile
Class InvalidAncestorException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--au.com.prunge.jgenfile.JGenFileException
                          |
                          +--au.com.prunge.jgenfile.InvalidAncestorException
All Implemented Interfaces:
Serializable

public class InvalidAncestorException
extends JGenFileException

An exception that occurs when a directory that is expected to be an ancestor of an item cannot be found.

Version:
1.0
Author:
Peter Runge
See Also:
Serialized Form

Constructor Summary
InvalidAncestorException(au.com.prunge.jgenfile.Item item, au.com.prunge.jgenfile.Directory ancestor)
          Constructs an InvalidAncestorException.
InvalidAncestorException(String s, au.com.prunge.jgenfile.Item item, au.com.prunge.jgenfile.Directory ancestor)
          Constructs an InvalidAncestorException with the specified detail message.
 
Method Summary
 au.com.prunge.jgenfile.Directory getAncestor()
          Returns the directory that was found not to be an ancestor of the item.
 au.com.prunge.jgenfile.Item getItem()
          Returns the item whose ancestor could not be found.
 
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

InvalidAncestorException

public InvalidAncestorException(au.com.prunge.jgenfile.Item item,
                                au.com.prunge.jgenfile.Directory ancestor)
                         throws NullPointerException
Constructs an InvalidAncestorException.

Parameters:
item - the item whose ancestor could not be found.
ancestor - the directory that was found not to be an ancestor of item.
Throws:
NullPointerException - if item or ancestor is null.

InvalidAncestorException

public InvalidAncestorException(String s,
                                au.com.prunge.jgenfile.Item item,
                                au.com.prunge.jgenfile.Directory ancestor)
Constructs an InvalidAncestorException with the specified detail message.

Parameters:
s - the detail message.
item - the item whose ancestor could not be found.
ancestor - the directory that was found not to be an ancestor of item.
Throws:
NullPointerException - if item or ancestor is null.
Method Detail

getItem

public au.com.prunge.jgenfile.Item getItem()
Returns the item whose ancestor could not be found.

Returns:
the item whose ancestor could not be found.

getAncestor

public au.com.prunge.jgenfile.Directory getAncestor()
Returns the directory that was found not to be an ancestor of the item.

Returns:
the non-ancestor directory.