to top
Android APIs
public class

AssertionError

extends Error
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Error
       ↳ java.lang.AssertionError
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Thrown when an assertion has failed.

Summary

Public Constructors
AssertionError()
Constructs a new AssertionError with no message.
AssertionError(Object detailMessage)
Constructs a new AssertionError with a message based on calling valueOf(Object) with the specified object.
AssertionError(boolean detailMessage)
Constructs a new AssertionError with a message based on calling valueOf(boolean) with the specified boolean value.
AssertionError(char detailMessage)
Constructs a new AssertionError with a message based on calling valueOf(char) with the specified character value.
AssertionError(int detailMessage)
Constructs a new AssertionError with a message based on calling valueOf(int) with the specified integer value.
AssertionError(long detailMessage)
Constructs a new AssertionError with a message based on calling valueOf(long) with the specified long value.
AssertionError(float detailMessage)
Constructs a new AssertionError with a message based on calling valueOf(float) with the specified float value.
AssertionError(double detailMessage)
Constructs a new AssertionError with a message based on calling valueOf(double) with the specified double value.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public AssertionError ()

Since: API Level 1

Constructs a new AssertionError with no message.

public AssertionError (Object detailMessage)

Since: API Level 1

Constructs a new AssertionError with a message based on calling valueOf(Object) with the specified object. If the object is an instance of Throwable, then it also becomes the cause of this error.

Parameters
detailMessage the object to be converted into the detail message and optionally the cause.

public AssertionError (boolean detailMessage)

Since: API Level 1

Constructs a new AssertionError with a message based on calling valueOf(boolean) with the specified boolean value.

Parameters
detailMessage the value to be converted into the message.

public AssertionError (char detailMessage)

Since: API Level 1

Constructs a new AssertionError with a message based on calling valueOf(char) with the specified character value.

Parameters
detailMessage the value to be converted into the message.

public AssertionError (int detailMessage)

Since: API Level 1

Constructs a new AssertionError with a message based on calling valueOf(int) with the specified integer value.

Parameters
detailMessage the value to be converted into the message.

public AssertionError (long detailMessage)

Since: API Level 1

Constructs a new AssertionError with a message based on calling valueOf(long) with the specified long value.

Parameters
detailMessage the value to be converted into the message.

public AssertionError (float detailMessage)

Since: API Level 1

Constructs a new AssertionError with a message based on calling valueOf(float) with the specified float value.

Parameters
detailMessage the value to be converted into the message.

public AssertionError (double detailMessage)

Since: API Level 1

Constructs a new AssertionError with a message based on calling valueOf(double) with the specified double value.

Parameters
detailMessage the value to be converted into the message.