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
-
LList()
-
-
LList(Object, LList)
-
-
Contents()
- get the contents of this element of the list
-
Delete_Item(Object)
- delete the list containing "item" from the list.
-
elements()
- a list acts as it's own Enumeration
-
hasMoreElements()
- for the Enumeration protocol
-
LList_Length(LList)
- return the length of the list, or 0 if it is null
-
Next()
- get the next element of the list
-
nextElement()
- for the Enumeration protocol
-
Set_Contents(Object)
- set the contents of the list to an arbitrary object
-
Set_Next(LList)
- set the next element of the list (to some other list)
-
Sort_Short_LList(CompareFunction)
- sort the list, using "fn" to compare pairs of elements.
LList
public LList()
LList
public LList(Object contents,
LList next)
elements
public Enumeration elements()
- a list acts as it's own Enumeration
nextElement
public Object nextElement()
- for the Enumeration protocol
hasMoreElements
public boolean hasMoreElements()
- for the Enumeration protocol
Contents
public Object Contents()
- get the contents of this element of the list
Next
public LList Next()
- get the next element of the list
Set_Contents
public void Set_Contents(Object to)
- set the contents of the list to an arbitrary object
Set_Next
public void Set_Next(LList next)
- set the next element of the list (to some other list)
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);
LList_Length
public static int LList_Length(LList l)
- return the length of the list, or 0 if it is null
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