Class CompositeRepresentation

java.lang.Object
org.assertj.core.presentation.CompositeRepresentation
All Implemented Interfaces:
Representation

public class CompositeRepresentation extends Object implements Representation
  • Constructor Details

    • CompositeRepresentation

      public CompositeRepresentation(List<Representation> representations)
  • Method Details

    • toStringOf

      public String toStringOf(Object object)
      Description copied from interface: Representation
      Returns the String representation of the given object. It may or may not be the object's own implementation of toString.
      Specified by:
      toStringOf in interface Representation
      Parameters:
      object - the object to represent.
      Returns:
      the toString representation of the given object.
    • unambiguousToStringOf

      public String unambiguousToStringOf(Object object)
      Description copied from interface: Representation
      Override this method to return a String representation of the given object that is unambigous so that it can be differentiated from other objects with the same Representation.toStringOf(Object) representation.

      The default implementation calls Representation.toStringOf(Object) but the StandardRepresentation adds the object hexadecimal identity hash code.

      Specified by:
      unambiguousToStringOf in interface Representation
      Parameters:
      object - the object to represent.
      Returns:
      the unambiguous toString representation of the given object.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getAllRepresentationsOrderedByPriority

      public List<Representation> getAllRepresentationsOrderedByPriority()