Class CompositeRepresentation

    • 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: 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 java.lang.String unambiguousToStringOf​(java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getAllRepresentationsOrderedByPriority

        public java.util.List<Representation> getAllRepresentationsOrderedByPriority()