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 Details

  • Method Details

    • createPresentationModel

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

      @Nonnull PresentationModel createPresentationModel(@Nonnull Collection<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 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 Object owner)
      Creates a default Presentable for the given object.
      Parameters:
      owner - the object
      Returns:
      the new instance
      Since:
      3.2-ALPHA-2