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

public Class OptionalShouldBePresent

extends BasicErrorMessageFactory
Class Inheritance
Static Imports
java.lang.String.format

Build error message when a value should be present in an java.util.Optional.
Author
Jean-Christophe Gay

Field Summary

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

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static OptionalShouldBePresent

Returns:

a error message factory.
shouldBePresent
(Object
the optional instance
optional
)

Indicates that a value should be present in an empty java.util.Optional.

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

Constructor Detail

OptionalShouldBePresentback to summary
private OptionalShouldBePresent(Object optional)

Method Detail

shouldBePresentback to summary
public static OptionalShouldBePresent shouldBePresent(Object optional)

Indicates that a value should be present in an empty java.util.Optional.

Parameters
optional:Object

the optional instance

Returns:OptionalShouldBePresent

a error message factory.

Exceptions
NullPointerException:
if optional is null.