user to modify the internal structure of list without our knowledge such modification would be possiblehoweverif we provided reference to node in our list in form that allowed the user to access internal data in that node (such as next or prev fieldto abstract and unify the different ways of storing elements in the various implementations of listwe introduce the concept of positionwhich formalizes the intuitive notion of "placeof an element relative to others in the list positions so as to safely expand the set of operations for listswe abstract notion of "positionthat allows us to enjoy the efficiency of doubly or singly linked list implementations without violating object-oriented design principles in this frameworkwe view list as collection of elements that stores each element at position and that keeps these positions arranged in linear order position is itself an abstract data type that supports the following simple methodelement()return the element stored at this position position is always defined relativelythat isin terms of its neighbors in lista position will always be "aftersome position and "beforesome position (unless is the first or last positiona position pwhich is associated with some element in list sdoes not changeeven if the index of changes in sunless we explicitly remove (andhencedestroy position pmoreoverthe position does not change even if we replace or swap the element stored at with another element these facts about positions allow us to define set of position-based list methods that take position objects as parameters and also provide position objects as return values the node list abstract data type using the concept of position to encapsulate the idea of "nodein listwe can define another type of sequence adt called the node list adt this adt supports the following methods for list sfirst()return the position of the first element of san error occurs if is empty last()return the position of the last element of san error occurs if is empty prev( )