String (final String contentEntryUrl, int delta) { final ContentEntry[] contentEntries = getModel().getContentEntries(); for (int idx = 0; idx < contentEntries.length; idx++) { ContentEntry entry = contentEntries[idx]; if (contentEntryUrl.equals(entry.getUrl())) { int nextEntryIndex = (idx + delta) % contentEntries.length; if (nextEntryIndex < 0) { nextEntryIndex += contentEntries.length; } return nextEntryIndex == idx ? null : contentEntries[nextEntryIndex].getUrl(); } } return null; }