LinkedList - package DataStructures; / / / / / / / / / / /...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
package DataStructures; // LinkedList class // // CONSTRUCTION: with no initializer // Access is via LinkedListItr class // // ******************PUBLIC OPERATIONS********************* // boolean isEmpty( ) --> Return true if empty; else false // void makeEmpty( ) --> Remove all items // LinkedListItr zeroth( )--> Return position to prior to first // LinkedListItr first( ) --> Return first position // void insert( x, p ) --> Insert x after current iterator position p // void remove( x ) --> Remove x // LinkedListItr find( x ) // --> Return position that views x // LinkedListItr findPrevious( x ) // --> Return position prior to x // ******************ERRORS******************************** // No special errors /** * Linked list implementation of the list * using a header node. * Access to the list is via LinkedListItr. * @author Mark Allen Weiss * @see LinkedListItr */ public class LinkedList { /** * Construct the list */ public LinkedList( ) { header = new ListNode( null ); } /** * Test if the list is logically empty. * @return true if empty, false otherwise.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

LinkedList - package DataStructures; / / / / / / / / / / /...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online