Top Description Fields Constructors Methods
org.assertj.core.error

public Class OptionalShouldBeEmpty

extends BasicErrorMessageFactory
Class Inheritance
Imports
java.util.Optional, .OptionalDouble, .OptionalInt, .OptionalLong

Build error message when an java.util.Optional should be empty.
Author
Jean-Christophe Gay

Field Summary

Inherited from org.assertj.core.error.BasicErrorMessageFactory:
argumentsformatformatter

Constructor Summary

AccessConstructor and Description
private
OptionalShouldBeEmpty(Class<?> optionalClass, Object optionalValue)

Method Summary

Modifier and TypeMethod and Description
public static <
the type of the value contained in the java.util.Optional.
VALUE
>
OptionalShouldBeEmpty

Returns:

a error message factory.
shouldBeEmpty
(Optional<VALUE>
the actual Optional to test.
optional
)

Indicates that the provided java.util.Optional should be empty.

public static OptionalShouldBeEmpty

Returns:

a error message factory.
shouldBeEmpty
(OptionalDouble
the actual OptionalDouble to test.
optional
)

Indicates that the provided java.util.OptionalDouble should be empty.

public static OptionalShouldBeEmpty

Returns:

a error message factory.
shouldBeEmpty
(OptionalInt
the actual OptionalInt to test.
optional
)

Indicates that the provided java.util.OptionalInt should be empty.

public static OptionalShouldBeEmpty

Returns:

a error message factory.
shouldBeEmpty
(OptionalLong
the actual OptionalLong to test.
optional
)

Indicates that the provided java.util.OptionalLong should be empty.

Inherited from org.assertj.core.error.BasicErrorMessageFactory:
createcreatecreateequalshashCodetoStringunquotedString

Constructor Detail

OptionalShouldBeEmptyback to summary
private OptionalShouldBeEmpty(Class<?> optionalClass, Object optionalValue)

Method Detail

shouldBeEmptyback to summary
public static <VALUE> OptionalShouldBeEmpty shouldBeEmpty(Optional<VALUE> optional)

Indicates that the provided java.util.Optional should be empty.

Parameters
<VALUE>
the type of the value contained in the java.util.Optional.
optional:Optional<VALUE>

the actual Optional to test.

Returns:OptionalShouldBeEmpty

a error message factory.

shouldBeEmptyback to summary
public static OptionalShouldBeEmpty shouldBeEmpty(OptionalDouble optional)

Indicates that the provided java.util.OptionalDouble should be empty.

Parameters
optional:OptionalDouble

the actual OptionalDouble to test.

Returns:OptionalShouldBeEmpty

a error message factory.

shouldBeEmptyback to summary
public static OptionalShouldBeEmpty shouldBeEmpty(OptionalInt optional)

Indicates that the provided java.util.OptionalInt should be empty.

Parameters
optional:OptionalInt

the actual OptionalInt to test.

Returns:OptionalShouldBeEmpty

a error message factory.

shouldBeEmptyback to summary
public static OptionalShouldBeEmpty shouldBeEmpty(OptionalLong optional)

Indicates that the provided java.util.OptionalLong should be empty.

Parameters
optional:OptionalLong

the actual OptionalLong to test.

Returns:OptionalShouldBeEmpty

a error message factory.