getNthEntry (ViewEntryCollection - Java)

Gets the entry at a specified position in a view entry collection.

Defined in



public ViewEntry getNthEntry(int n)
    throws NotesException


int n

A number indicating the entry to return. Use 1 to indicate the first entry in the collection, 2 to indicate the second entry, and so on.

Return value


The entry in the nth position in the view entry collection. If there is no document at the specified position, returns null.


View collections are renumbered when deletions occur so that the positions of entries after the deleted entry change.

Using getNthEntry to iterate through a loop is strongly discouraged for performance reasons. See getFirstEntry, getLastEntry, getNextEntry, and getPrevEntry for the preferred loop structure.