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
-
-
Field Summary
Fields Modifier and Type Field Description static HexadecimalRepresentationHEXA_REPRESENTATIONstatic intNIBBLE_SIZEstatic StringPREFIX-
Fields inherited from class org.assertj.core.presentation.StandardRepresentation
ELEMENT_SEPARATOR, ELEMENT_SEPARATOR_WITH_NEWLINE, INDENTATION_AFTER_NEWLINE, INDENTATION_FOR_SINGLE_LINE, STANDARD_REPRESENTATION
-
-
Constructor Summary
Constructors Constructor Description HexadecimalRepresentation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static StringtoGroupedHex(Number value, int size)private static StringtoHex(Number value, int sizeInBits)protected StringtoStringOf(Byte b)protected StringtoStringOf(Character character)protected StringtoStringOf(Double d)protected StringtoStringOf(Float f)protected StringtoStringOf(Integer i)protected StringtoStringOf(Long l)protected StringtoStringOf(Number number)StringtoStringOf(Object object)Returns hexadecimal thetoStringrepresentation of the given object.protected StringtoStringOf(Short s)protected StringtoStringOf(Representation representation, String s)-
Methods inherited from class org.assertj.core.presentation.StandardRepresentation
customFormat, fallbackToStringOf, format, format, formatArray, formatPrimitiveArray, getMaxElementsForPrinting, getMaxLengthForSingleLineDescription, hasCustomFormatterFor, multiLineFormat, multiLineFormat, registerFormatterForType, removeAllRegisteredFormatters, resetDefaults, setMaxElementsForPrinting, setMaxLengthForSingleLineDescription, singleLineFormat, singleLineFormat, smartFormat, smartFormat, toString, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, toStringOf, unambiguousToStringOf
-
-
-
-
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 thetoStringrepresentation of the given object. It may or not the object's own implementation oftoString.- Specified by:
toStringOfin interfaceRepresentation- Overrides:
toStringOfin classStandardRepresentation- Parameters:
object- the given object.- Returns:
- the
toStringrepresentation of the given object.
-
toStringOf
protected String toStringOf(Number number)
- Overrides:
toStringOfin classStandardRepresentation
-
toStringOf
protected String toStringOf(Long l)
- Overrides:
toStringOfin classStandardRepresentation
-
toStringOf
protected String toStringOf(Float f)
- Overrides:
toStringOfin classStandardRepresentation
-
toStringOf
protected String toStringOf(Character character)
- Overrides:
toStringOfin classStandardRepresentation
-
toStringOf
protected String toStringOf(Representation representation, String s)
-
-