All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dlib.LList

java.lang.Object
   |
   +----dlib.BaseObject
           |
           +----dlib.LList

public class LList
extends BaseObject
implements Enumeration
implements a simple list (as in "lisp") and some useful methods on it


Constructor Index

 o LList()
 o LList(Object, LList)

Method Index

 o Contents()
get the contents of this element of the list
 o Delete_Item(Object)
delete the list containing "item" from the list.
 o elements()
a list acts as it's own Enumeration
 o hasMoreElements()
for the Enumeration protocol
 o LList_Length(LList)
return the length of the list, or 0 if it is null
 o Next()
get the next element of the list
 o nextElement()
for the Enumeration protocol
 o Set_Contents(Object)
set the contents of the list to an arbitrary object
 o Set_Next(LList)
set the next element of the list (to some other list)
 o Sort_Short_LList(CompareFunction)
sort the list, using "fn" to compare pairs of elements.

Constructors

 o LList
 public LList()
 o LList
 public LList(Object contents,
              LList next)

Methods

 o elements
 public Enumeration elements()
a list acts as it's own Enumeration

 o nextElement
 public Object nextElement()
for the Enumeration protocol

 o hasMoreElements
 public boolean hasMoreElements()
for the Enumeration protocol

 o Contents
 public Object Contents()
get the contents of this element of the list

 o Next
 public LList Next()
get the next element of the list

 o Set_Contents
 public void Set_Contents(Object to)
set the contents of the list to an arbitrary object

 o Set_Next
 public void Set_Next(LList next)
set the next element of the list (to some other list)

 o Delete_Item
 public LList Delete_Item(Object item)
delete the list containing "item" from the list. Returns a new head for the list, so correct usage is theList = theList.Delete_Item(object);

 o LList_Length
 public static int LList_Length(LList l)
return the length of the list, or 0 if it is null

 o Sort_Short_LList
 public LList Sort_Short_LList(CompareFunction fn)
sort the list, using "fn" to compare pairs of elements. This is implemented by a bubble sort, so is only appropriate for short lists, hence the name. Returns a new head for the list, so correct usage is theList=theList.Sort_Short_List(comparefn);


All Packages  Class Hierarchy  This Package  Previous  Next  Index