public static NodeNavigator.NavigationNode<A extends Activity>
Node which can be navigated to and from.
Note that implementation MUST be immutable and all methods must produce the same outcome no matter how many times they were called (in other words - be idempotent).
boolean isActionNode()
true if this node should remain in navigation history (i.e. should be
restored during NodeNavigator.bind or be reachable by
NodeNavigator.navigateBack). false if node is fire-and-forget.void navigateTo(@NotNull
A activity,
@NotNull
java.lang.Object data)
Called when this node is on the top of navigation queue. In other words - show contents of the node.
Take special care to revert ALL changes made at this step in .navigateFrom.
void navigateFrom(@NotNull
A activity,
@NotNull
java.lang.Object data)
Called when this node is becoming inactive. In other words - contents of the node should be hidden.
You should revert all changes made in .navigateTo
boolean interceptBackNavigation(@NotNull
A activity)
true if this node intercepts .navigateBack event and therefore
event should be cancelled. false if this node does not intercept
.navigateBack and therefore back navigation will be performed.boolean canHandleNavigationEvent(@NotNull
java.lang.Object event)
true if this node is capable of handling given navigation event.
false if this node can't handle this event and it therefore should be passed
further.