Package org.assertj.core.presentation
Class CompositeRepresentation
- java.lang.Object
-
- org.assertj.core.presentation.CompositeRepresentation
-
- All Implemented Interfaces:
Representation
public class CompositeRepresentation extends java.lang.Object implements Representation
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Representation>representations-
Fields inherited from interface org.assertj.core.presentation.Representation
DEFAULT_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description CompositeRepresentation(java.util.List<Representation> representations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Representation>getAllRepresentationsOrderedByPriority()java.lang.StringtoString()java.lang.StringtoStringOf(java.lang.Object object)Returns theStringrepresentation of the given object.java.lang.StringunambiguousToStringOf(java.lang.Object object)Override this method to return aStringrepresentation of the given object that is unambigous so that it can be differentiated from other objects with the sameRepresentation.toStringOf(Object)representation.-
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
-
representations
private final java.util.List<Representation> representations
-
-
Constructor Detail
-
CompositeRepresentation
public CompositeRepresentation(java.util.List<Representation> representations)
-
-
Method Detail
-
toStringOf
public java.lang.String toStringOf(java.lang.Object object)
Description copied from interface:RepresentationReturns theStringrepresentation of the given object. It may or may not be the object's own implementation oftoString.- Specified by:
toStringOfin interfaceRepresentation- Parameters:
object- the object to represent.- Returns:
- the
toStringrepresentation of the given object.
-
unambiguousToStringOf
public java.lang.String unambiguousToStringOf(java.lang.Object object)
Description copied from interface:RepresentationOverride this method to return aStringrepresentation of the given object that is unambigous so that it can be differentiated from other objects with the sameRepresentation.toStringOf(Object)representation.The default implementation calls
Representation.toStringOf(Object)but theStandardRepresentationadds the object hexadecimal identity hash code.- Specified by:
unambiguousToStringOfin interfaceRepresentation- Parameters:
object- the object to represent.- Returns:
- the unambiguous
toStringrepresentation of the given object.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getAllRepresentationsOrderedByPriority
public java.util.List<Representation> getAllRepresentationsOrderedByPriority()
-
-