ActionCallback () { int contentCount = getContentCount(); LOG.assertTrue(contentCount > 1); Content selectedContent = getSelectedContent(); int index = selectedContent == null ? -1 : getIndexOfContent(selectedContent); index = (index - 1 + contentCount) % contentCount; final Content content = getContent(index); if (content == null) { return null; } return setSelectedContentCB(content, true); }