Package moxy

Class PresenterStore


  • public class PresenterStore
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      PresenterStore()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T extends MvpPresenter>
      void
      add​(java.lang.String tag, T instance)
      Add presenter to storage
      MvpPresenter get​(java.lang.String tag)
      Get a presenter by tag
      void logPresenters()  
      MvpPresenter remove​(java.lang.String tag)
      Remove a presenter from store.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PresenterStore

        public PresenterStore()
    • Method Detail

      • add

        public <T extends MvpPresenter> void add​(java.lang.String tag,
                                                 T instance)
        Add presenter to storage
        Type Parameters:
        T - Type of a presenter
        Parameters:
        tag - Tag of a presenter. Local presenters also contain delegate's tag as their prefix
        instance - Instance of MvpPresenter implementation to store
      • get

        public MvpPresenter get​(java.lang.String tag)
        Get a presenter by tag
        Parameters:
        tag - Tag of a presenter. Local presenters also contain delegate's tag as their prefix
        Returns:
        Presenter if exists. Null otherwise (if it doesn't exists)
      • remove

        public MvpPresenter remove​(java.lang.String tag)
        Remove a presenter from store.
        Parameters:
        tag - Tag of a presenter. Local presenters also contain delegate's tag as their prefix
        Returns:
        Presenter that was removed
      • logPresenters

        public void logPresenters()