I'm looking for an umbrella term for "next" and "previous" so that I don't have to call my programming methods "NextPrevious".
Is there a hypernym for the two?
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It only takes a minute to sign up.
Sign up to join this communityI'm looking for an umbrella term for "next" and "previous" so that I don't have to call my programming methods "NextPrevious".
Is there a hypernym for the two?
How about adjacent:
Next to or adjoining something else
Other options you could incorporate into your method name include near, neighbor, and one over.
If you are iterating some list-like recursive structure, same level entities can be called siblings. For example, in tree children sharing the same parent are called siblings.
But sibling include also the current node, compare to which one other nodes can are next or previous.
If next and previous are something about, say, navigation buttons, better stay with those words.