/** * Gets the index of the item to be retrieved if {@link #previous()} is called. * * @return the index of the item to be retrieved next */ @Override public int previousIndex() { return this.index - getStartIndex() - 1; }
/** * Returns true if there are previous elements to return from the array. * * @return true if there is a previous element to return */ @Override public boolean hasPrevious() { return this.index > getStartIndex(); }
/** * Gets the next index to be retrieved. * * @return the index of the item to be retrieved next */ @Override public int nextIndex() { return this.index - getStartIndex(); }