DDS — Linked List View
 
 
DDS Homepage
Your current browser does not support Canvas! Use Firefox or Google Chrome.

Welcome to DDS—Linked List, the web based linked list editor. This help page will get you started with the usage of DDS. You may resize this dialog by dragging an edge or corner. You may move this dialog by dragging its title bar. Click the in the upper corner to close this dialog.

Select one of the following topics to learn more about how to use DDS.

DDS—Linked List Overview

DDS—Linked List is a web based application to dynamically build, model, and manipulate linked lists.

DDS provides a Node data type, with the data fields payload and next. Node objects use a reference model of access and assignment.

class Node{
	String payload;
	Node next;
}
The next field is a reference type and is used to access another Node object.

You may create a Node reference variable and instantiate Node objects. They are graphically represented on the screen. A Node reference variable is represented by its name and source disk for the Node reference. A Node object is represented as a box containing the payload value and the source disk of the next reference. References are modeled by a link from a Node reference to a Node object. The link is sourced from the small disk in the reference and links to the box for a Node object. Null references are represented by a reference disk with no attached link.

In this example, the Node reference list has a link to the Node object containing the payload value 123. The next field in the Node object is null.

You can left click on a Node reference or a Node object to select it. They can be dragged with the mouse to reposition them. Selected references and objects have action buttons used to modify the object that they reference.

DDS also provides a save and load data ability. It can download a PNG image of the current display.

DDS is a prototype system. While new features are periodically added, it lacks many features such as undo and selection of multiple items.

Node Reference Variables

New Node reference variables are created by clicking on the Add Node Ref button.

A dialog will prompt for the name of the Node reference variable. Type in the name, and click the OK button.

The reference variable will appear on the screen. The blue hashing behind the variable indicates that it has been selected.

Nodes

Node objects can be linked together to form linked lists, by using the next field to link to the next Node object.

Reachable Nodes

Node objects in a linked list are considered reachable if they are referenced by a Node reference variable or through one next referenced by a Node reference variable. The next reference in a reachable object can be used as the source or destination in an assignment.

The next reference disk in an unreachable object is shown in gray instead of black. Any unreachable links are shown as gray dotted lines instead of black solid lines.

Reachable nodes model the use of the code list.next or list.next.next in an assignment, but prohibits the use of any situation that models list.next.next.next in an assignment. This forces the use of a Node reference variable to walk a list in order to access one of its members, much as a programmer must do in code.

The reachable node model also allows the removal from the linked list of a Node that directly follows a Node object that is referenced by a Node reference variable. In the previous image, we can unlink the Node object that contains the payload value "there." The equivalent code is given by the following statement.

temp.next = temp.next.next;

Dragging and Selection

Dragging Objects

Node reference variables and Node objects can be dragged with the mouse to reposition them. Do not press the mouse over the reference disk as that action is used to initiate assignment. The dragged object will be selected when the dragging is complete. Dragging out of bound cancels the move and restores the object to its initial position.

Selecting Objects

Node reference variables and Node objects can be selected by clicking on them, except on the reference disk. Selected objects will be outlined with a blue hash pattern. If the object is reachable, an assignment pop-up menu will appear in the menu bar.

Objects are also selected if they are the destination object of an assignment done by dragging a link or after they have been dragged with the mouse.

Pressing the mouse off of a selected object, will end the selection.

Assignment Actions

Assignments can be done by dragging a link or using a pop-up menu of assignment options.

Drag a Link

Assignment can be done between two reachable reference disks by dragging the link from the source reference disk to the destination disk. Consider this assignment, temp.next = list.next Mouse down on the reference disk in the Node object, and drag to the reference disk in the Node object. Dragging out of bounds or to an unreachable reference disk, cancels the assignment. The resulting image shows the completed assignment.

Assignment Menu

When a Node or Node reference variable is selected and is reachable, a menu of assignment options will appear in the main menu bar. These are assigments that can be done to the Node reference variable or to the next member of a Node object.

If object is the selected object, the following are the available assignment options.

New Node

object = new Node() Instantiates a new Node object. A dialog box will pop up to enter the value for the payload.

Next Node

object = object.next Follow the next link to get to the next Node object. This option will not appear if the next link is null.

Null

object = null Set a Node reference variable or the next field of a Node object to null.

Other User Options

There are four buttons on the right of the command tool bar that allow the user to load a linked list model, download a linked list model, download an image of the model, collect garbage, and get help.

Load

Load a saved file.

Download

Download a file to save the current data.

Image

Download a PNG image of the current display.

Garbage

Clean up garbage.

Help

Display this help file.

About DDS—Linked List

DDS—Linked List, version 0.2 test version. The software will be updated as features are added.

© 2015-2017, Dr. Robert A. Ravenscroft, Jr.

You may use this software as-is, free of charge for academic purposes.

This program is provided 'as is' without warranty of any kind, expressed or implied.