@Test(expected = IllegalStateException.class) public void testCanUndo() { Assert.assertFalse(this.undoManager.canUndo()); this.undoManager.undoableEditHappened(this.managedModel); Assert.assertTrue(this.undoManager.canUndo()); this.undoManager.undo(); Assert.assertFalse(this.undoManager.canUndo()); this.undoManager.undo(); }
public boolean canUndo() { return this.availableUndos.size() > 1; }
UndoManager { public boolean canUndo() { return this.availableUndos.size() > 1; } }
UndoManager { public boolean canUndo() { return this.availableUndos.size() > 1; } UndoManager(final M initialState); }
UndoManager { public boolean canUndo() { return this.availableUndos.size() > 1; } UndoManager(final M initialState); void reset(final M initialState); void setLimit(final int limit); void undoableEditHappened(final M changedState); M undo(); M redo(); boolean canUndo(); boolean canRedo(); }
UndoManager { public boolean canUndo() { return this.availableUndos.size() > 1; } UndoManager(final M initialState); void reset(final M initialState); void setLimit(final int limit); void undoableEditHappened(final M changedState); M undo(); M redo(); boolean canUndo(); boolean canRedo();  }