/** * Toggles the monoflop and returns its state <b>before</b> it was toggled. * <p> * If the monoflop is in its initial state, this will return <tt>true</tt> (and toggle the monoflop). * Therefore all successive class will return <tt>false</tt>. * * @return <tt>true</tt> if the monoflop was not toggled yet, <tt>false</tt> for all successive calls */ public boolean inverseToggle() { return !toggle(); }
/** * Reads and then toggles the monoflop. * <p> * If the monoflop is in its initial state, this will return <tt>false</tt> (and toggle the monoflop). * Therefore all successive class will return <tt>true</tt>. * <p> * This is just an alias for {@link #toggle()}. * * @return <tt>false</tt> if the monoflop was not toggled yet, <tt>true</tt> for all successive calls */ public boolean successiveCall() { return toggle(); }