|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--giden.GRDS.LinkList
Copyright (c) 1993-2004 C. R. Coullard, D. S. Dilworth, J. H. Owen,
All Rights Reserved.
We make no representations or warranties about the suitability of
the software, either express or implied, including but not limited
to the implied warranties of merchantability, fitness for a
particular purpose, or non-infringement. We shall not be liable for
any damages suffered by user as a result of using, modifying or
distributing this software or its derivatives.
LinkList is a base class that is inherited by the SingleLinkList and DoubleLinkList classes. Although the current LinkList class implements a double link list, the future design is to implement the single link and double link functionality in the above named classes. To ensure future compatibility, users should create SingleLinkList or DoubleLinkList objects; these objects can then be manipulated as LinkList objects.
A LinkList is comprised of ListEntry objects. Each ListEntry object contains link information for the list and the list-item of interest to the application. The LinkList class only provides methods for iterating with ListEntry objects; the user can access the underlying list-items by manipulating the ListEntry objects. The ListIter class is an easier and recommended way of iterating and accessing the list-items. Any method returning a ListEntry will return null if accesses are attempted on an empty list or beyond the boundaries of the list.
Copyright (c) 1993-2003 C. R. Coullard, D. S. Dilworth, J. H. Owen, All Rights Reserved.
Network
,
DoubleLinkList
,
ListEntry
,
ListIter
,
SingleLinkList
, Serialized FormConstructor Summary | |
LinkList()
Creates an empty link list. |
Method Summary | |
ListEntry |
AddItem(java.lang.Object item)
Adds an item to this list |
java.lang.Object |
clone()
Returns a clone of this list |
void |
DeleteContents()
Deletes all entries in this list |
void |
DeleteEntry(ListEntry entry)
Deletes the list entry |
ListEntry |
GetFirstEntry()
Gets the first entry in this list |
ListEntry |
GetHead()
Gets the head of this list |
ListEntry |
GetLastEntry()
Gets the last entry in this list |
ListEntry |
GetNextEntry(ListEntry entry)
Gets the next entry in this list |
ListEntry |
GetPrevEntry(ListEntry entry)
Gets the previous entry in this list |
int |
GetSize()
Gets the current number of items in this list |
ListEntry |
GetTail()
Gets the tail of this list |
boolean |
InsertBefore(ListEntry first,
ListEntry second)
Inserts the second entry after the first entry. |
void |
JoinList(LinkList list)
Appends the given list to this list |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LinkList()
Method Detail |
public java.lang.Object clone()
public int GetSize()
public ListEntry AddItem(java.lang.Object item)
item
- the item to be added to this listpublic void JoinList(LinkList list)
list
- The list to append to this list object.public ListEntry GetHead()
public ListEntry GetTail()
public ListEntry GetFirstEntry()
public ListEntry GetNextEntry(ListEntry entry)
entry
- the current position in this listpublic ListEntry GetPrevEntry(ListEntry entry)
entry
- the current position in this listpublic ListEntry GetLastEntry()
public void DeleteEntry(ListEntry entry)
entry
- the entry to delete from this listpublic boolean InsertBefore(ListEntry first, ListEntry second)
public void DeleteContents()
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |