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(String detailMessage, Throwable cause)
Constructs a new AssertionError with the given detail message and cause.
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 ()

Added in API level 1

Constructs a new AssertionError with no message.

public AssertionError (String detailMessage, Throwable cause)

Added in API level 19

Constructs a new AssertionError with the given detail message and cause.

public AssertionError (Object detailMessage)

Added in 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)

Added in 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)

Added in 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)

Added in 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)

Added in 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)

Added in 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)

Added in 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.