org.jscience.util
Class AssertionFailure

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Error
          extended by java.lang.AssertionError
              extended by org.jscience.util.AssertionFailure
All Implemented Interfaces:
java.io.Serializable

public class AssertionFailure
extends java.lang.AssertionError

An unchecked exception representing an Assertion failure.

Assertion failures should be raised when code finds itself in a state that should be impossible. It should not be raised in response to any predictable error condition. Assertion failures indicate that something has gone badly wrong, and that the assumptions under which library code has been developed are not holding.

This extends AssertionError, adding convenient constructors with messages and causes.

Since:
1.4
See Also:
Serialized Form

Constructor Summary
AssertionFailure(java.lang.String message)
          Creates a new AssertionFailure object.
AssertionFailure(java.lang.String message, java.lang.Throwable cause)
          Creates a new AssertionFailure object.
AssertionFailure(java.lang.Throwable cause)
          Creates a new AssertionFailure object.
 
Method Summary
 
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

AssertionFailure

public AssertionFailure(java.lang.String message)
Creates a new AssertionFailure object.

Parameters:
message - DOCUMENT ME!

AssertionFailure

public AssertionFailure(java.lang.Throwable cause)
Creates a new AssertionFailure object.

Parameters:
cause - DOCUMENT ME!

AssertionFailure

public AssertionFailure(java.lang.String message,
                        java.lang.Throwable cause)
Creates a new AssertionFailure object.

Parameters:
message - DOCUMENT ME!
cause - DOCUMENT ME!