Interface Presentable

  • All Known Implementing Classes:
    SimpleCompositePresentable
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface Presentable
    The role of an object that can be presented on a UI, thus is capable of creating a PresentationModel.
    Author:
    Fabrizio Giudici
    Stereotype:
    Role
    • Field Detail

      • _Presentable_

        static final java.lang.Class<Presentable> _Presentable_
    • Method Detail

      • createPresentationModel

        default PresentationModel createPresentationModel()
        Returns:
        the PresentationModel
        Since:
        3.2-ALPHA-3 (refactored)
      • createPresentationModel

        @Nonnull
        PresentationModel createPresentationModel​(@Nonnull
                                                  java.util.Collection<java.lang.Object> instanceRoles)
        Creates a PresentationModel with some roles.
        Parameters:
        instanceRoles - the roles
        Returns:
        the PresentationModel
        Since:
        3.2-ALPHA-3 (refactored)
      • createPresentationModel

        @Nonnull
        default PresentationModel createPresentationModel​(@Nonnull
                                                          java.lang.Object instanceRole)
        Creates a PresentationModel with a single role.
        Parameters:
        instanceRole - the role
        Returns:
        the PresentationModel
        Since:
        3.2-ALPHA-3
      • of

        @Nonnull
        static Presentable of​(@Nonnull
                              java.lang.Object owner)
        Creates a default Presentable for the given object.
        Parameters:
        owner - the object
        Returns:
        the new instance
        Since:
        3.2-ALPHA-2