Back to index

wims  3.65+svn20090927
ListElement.java
Go to the documentation of this file.
00001 package rene.util.list;
00002 
00008 public class ListElement
00009 // A list node with pointers to previous and next element
00010 // and with a content of type Object.
00011 {      ListElement Next,Previous; // the chain pointers
00012        Object Content; // the content of the node
00013        ListClass L; // Belongs to this list
00014        
00015        public ListElement (Object content)
00016        // get a new Element with the content and null pointers
00017        {      Content=content;
00018               Next=Previous=null;
00019               L=null;
00020        }
00021 
00022        // access methods:
00023        public Object content ()
00024        {      return Content;
00025        }
00026        public ListElement next () { return Next; }
00027        public ListElement previous () { return Previous; }
00028        public void list (ListClass l) { L=l; }
00029 
00030        // modifying methods:
00031        public void content (Object o) { Content=o; }
00032        public void next (ListElement o) { Next=o; }
00033        public void previous (ListElement o) { Previous=o; }
00034        public ListClass list () { return L; }
00035 }
00036 
00037