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

public Class ShouldBeNumeric

extends BasicErrorMessageFactory
Class Inheritance

Creates an error message that indicates an assertion that cast string to a number (byte, short, integer, long, float or double) failed.
Author
hezean

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

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 ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldBeNumeric
(String
the actual value in the failed assertion.
actual
,
ShouldBeNumeric.NumericType
the type expected to cast.
type
)

Creates a new ShouldBeNumeric.

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

Constructor Detail

ShouldBeNumericback to summary
private ShouldBeNumeric(String actual, ShouldBeNumeric.NumericType type)

Method Detail

shouldBeNumericback to summary
public static ErrorMessageFactory shouldBeNumeric(String actual, ShouldBeNumeric.NumericType type)

Creates a new ShouldBeNumeric.

Parameters
actual:String

the actual value in the failed assertion.

type:ShouldBeNumeric.NumericType

the type expected to cast.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

org.assertj.core.error back to summary

public final Enum ShouldBeNumeric.NumericType

extends Enum<ShouldBeNumeric.NumericType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final ShouldBeNumeric.NumericType
public static final ShouldBeNumeric.NumericType
public static final ShouldBeNumeric.NumericType
public static final ShouldBeNumeric.NumericType
public static final ShouldBeNumeric.NumericType
public static final ShouldBeNumeric.NumericType
private final String

Constructor Summary

AccessConstructor and Description
private
NumericType(String typeName)

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration.
public static ShouldBeNumeric.NumericType
public static ShouldBeNumeric.NumericType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

BYTEback to summary
public static final ShouldBeNumeric.NumericType BYTE
DOUBLEback to summary
public static final ShouldBeNumeric.NumericType DOUBLE
FLOATback to summary
public static final ShouldBeNumeric.NumericType FLOAT
INTEGERback to summary
public static final ShouldBeNumeric.NumericType INTEGER
LONGback to summary
public static final ShouldBeNumeric.NumericType LONG
SHORTback to summary
public static final ShouldBeNumeric.NumericType SHORT
typeNameback to summary
private final String typeName

Constructor Detail

NumericTypeback to summary
private NumericType(String typeName)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Enum.toString.

Doc from java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists.

Returns:String

the name of this enum constant

Annotations
@Override
valueOfback to summary
public static ShouldBeNumeric.NumericType valueOf(String name)
valuesback to summary
public static ShouldBeNumeric.NumericType[] values()