/** * Creates a new TransitionAnchor with the given attributes. * * @param navigation * The navigation system this page transition participates in. * @param toPage * The page type this transition goes to. Not null. * @param state * The page state. Cannot be null (but can be an empty multimap) * @throws NullPointerException * if any of the arguments are null. */ TransitionAnchor(Navigation navigation, final Class<P> toPage, final Multimap<String, String> state, HistoryTokenFactory htFactory) { this.navigation = Assert.notNull(navigation); this.toPageWidgetType = Assert.notNull(toPage); this.state = Assert.notNull(state); this.htFactory = Assert.notNull(htFactory); addClickHandler(this); addAttachHandler(new Handler() { @Override public void onAttachOrDetach(AttachEvent event) { if (event.isAttached()) initHref(toPage, state); } }); }
/** * Creates a new TransitionAnchor with the given attributes. * * @param navigation * The navigation system this page transition participates in. * @param toPage * The page type this transition goes to. Not null. * @param state * The page state. Cannot be null (but can be an empty multimap) * @throws NullPointerException * if any of the arguments are null. */ TransitionAnchor(Navigation navigation, final Class<P> toPage, final Multimap<String, String> state, HistoryTokenFactory htFactory) { this.navigation = Assert.notNull(navigation); this.toPageWidgetType = Assert.notNull(toPage); this.state = Assert.notNull(state); this.htFactory = Assert.notNull(htFactory); addClickHandler(this); addAttachHandler(new Handler() { @Override public void onAttachOrDetach(AttachEvent event) { if (event.isAttached()) initHref(toPage, state); } }); }