Class HistoryWidget.FactoryImpl

    • Constructor Detail

      • FactoryImpl

        public FactoryImpl()
    • Method Detail

      • widgetType

        public Class<HistoryWidget> widgetType()
        Description copied from class: WidgetFactory
        A supertype of any widgets this factory might produce. Defined so that factories which produce irrelevant widgets need not be consulted. If your implementation was returning multiple disparate kinds of widgets, it is best to split it into two factories.

        If an API defines an abstract Widget subtype, and you are providing a concrete implementation, you may return the API type here to delay class loading.

        Specified by:
        widgetType in class WidgetFactory<Job,​HistoryWidget>
        Returns:
        a bound for the result of WidgetFactory.createFor(T)
      • createFor

        @NonNull
        public Collection<HistoryWidget> createFor​(@NonNull
                                                   Job target)
        Description copied from class: WidgetFactory
        Creates widgets for a given object. This may be called frequently for the same object, so if your implementation is expensive, do your own caching.
        Specified by:
        createFor in class WidgetFactory<Job,​HistoryWidget>
        Parameters:
        target - a widgetable object
        Returns:
        a possible empty set of widgets (typically either using Set.of()).