Package org.assertj.core.presentation
Class HexadecimalRepresentation
- java.lang.Object
-
- org.assertj.core.presentation.StandardRepresentation
-
- org.assertj.core.presentation.HexadecimalRepresentation
-
- All Implemented Interfaces:
Representation
public class HexadecimalRepresentation extends StandardRepresentation
Hexadecimal object representation instead of standard java representation.- Author:
- Mariusz Smykula
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.assertj.core.presentation.StandardRepresentation
StandardRepresentation.GroupType
-
-
Field Summary
Fields Modifier and Type Field Description static HexadecimalRepresentation
HEXA_REPRESENTATION
static int
NIBBLE_SIZE
static String
PREFIX
-
Fields inherited from class org.assertj.core.presentation.StandardRepresentation
ELEMENT_SEPARATOR, ELEMENT_SEPARATOR_WITH_NEWLINE, INDENTATION_AFTER_NEWLINE, INDENTATION_FOR_SINGLE_LINE, STANDARD_REPRESENTATION
-
Fields inherited from interface org.assertj.core.presentation.Representation
DEFAULT_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description HexadecimalRepresentation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static String
toGroupedHex(Number value, int size)
private static String
toHex(Number value, int sizeInBits)
protected String
toStringOf(Byte b)
protected String
toStringOf(Character character)
protected String
toStringOf(Double d)
protected String
toStringOf(Float f)
protected String
toStringOf(Integer i)
protected String
toStringOf(Long l)
protected String
toStringOf(Number number)
String
toStringOf(Object object)
Returns hexadecimal thetoString
representation of the given object.protected String
toStringOf(Short s)
protected String
toStringOf(Representation representation, String s)
-
Methods inherited from class org.assertj.core.presentation.StandardRepresentation
classNameDisambiguation, customFormat, fallbackToStringOf, format, format, formatArray, formatPrimitiveArray, getMaxElementsForPrinting, getMaxLengthForSingleLineDescription, getMaxStackTraceElementsDisplayed, hasAlreadyAnUnambiguousToStringOf, hasCustomFormatterFor, multiLineFormat, multiLineFormat, registerFormatterForType, removeAllRegisteredFormatters, resetDefaults, safeStringOf, setMaxElementsForPrinting, setMaxLengthForSingleLineDescription, setMaxStackTraceElementsDisplayed, singleLineFormat, singleLineFormat, smartFormat, smartFormat, toString, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, unambiguousToStringOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.assertj.core.presentation.Representation
getPriority
-
-
-
-
Field Detail
-
HEXA_REPRESENTATION
public static final HexadecimalRepresentation HEXA_REPRESENTATION
-
PREFIX
public static final String PREFIX
- See Also:
- Constant Field Values
-
NIBBLE_SIZE
public static final int NIBBLE_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
toStringOf
public String toStringOf(Object object)
Returns hexadecimal thetoString
representation of the given object. It may or not the object's own implementation oftoString
.- Specified by:
toStringOf
in interfaceRepresentation
- Overrides:
toStringOf
in classStandardRepresentation
- Parameters:
object
- the given object.- Returns:
- the
toString
representation of the given object.
-
toStringOf
protected String toStringOf(Number number)
- Overrides:
toStringOf
in classStandardRepresentation
-
toStringOf
protected String toStringOf(Long l)
- Overrides:
toStringOf
in classStandardRepresentation
-
toStringOf
protected String toStringOf(Float f)
- Overrides:
toStringOf
in classStandardRepresentation
-
toStringOf
protected String toStringOf(Character character)
- Overrides:
toStringOf
in classStandardRepresentation
-
toStringOf
protected String toStringOf(Representation representation, String s)
-
-