Interface History

All Known Implementing Classes:
WebHistory

public interface History
Interface defining methods to store and access local copy of opened screens history.

It is mainly used by UrlChangeHandler to distinguish history and navigation transitions.

Pay attention that manual history mutation can lead to errors.

  • Method Details

    • forward

      void forward(NavigationState navigationState)
      Adds new history entry. Flushes all entries coming after current entry.
      Parameters:
      navigationState - new history entry
    • backward

      NavigationState backward()
      Performs "Back" transition through history.
      Returns:
      previous history entry
    • getNow

      @Nullable NavigationState getNow()
      Returns:
      current history entry
    • getPrevious

      @Nullable NavigationState getPrevious()
      Returns:
      previous history entry
    • getNext

      @Nullable NavigationState getNext()
      Returns:
      next history entry
    • searchBackward

      boolean searchBackward(NavigationState navigationState)
      Performs search for the given history entry in the past.
      Parameters:
      navigationState - history entry
      Returns:
      true if entry is found, false otherwise
    • searchForward

      boolean searchForward(NavigationState navigationState)
      Performs search for the given history entry in the future.
      Parameters:
      navigationState - history entry
      Returns:
      true if entry is found, false otherwise
    • has

      boolean has(NavigationState navigationState)
      Checks whether history has the given entry.
      Parameters:
      navigationState - history entry
      Returns:
      true if history has an entry, false otherwise
    • replace

      boolean replace(NavigationState navigationState)
      Replaces current state by the new one.

      This operation is allowed when only params are changed.

      Parameters:
      navigationState - new state
      Returns:
      true if old state is replaced, false otherwise