structure
Class AppendableList
java.lang.Object
|
+--structure.AbstractStructure
|
+--structure.AbstractList
|
+--structure.CircularList
|
+--structure.AppendableList
- All Implemented Interfaces:
- List, Structure
- public class AppendableList
- extends CircularList
An extension of the circular list class that provides
an operation for merging an object of this type with
a CircularList in constant time. This is accomplished
through pointer manipulation rather than by iterating through
the structure and copying each element as it appears.
In the context of fibonacci heaps, this constant time merge method
facilitates the effecient implementation of the merge and remove
methods.
Method Summary |
void |
merge(AppendableList l)
Provides a constant time function that merges the contents
of two lists by appending l to this list. |
Methods inherited from class structure.CircularList |
add, add, addFirst, addLast, clear, contains, get, getFirst, getLast, getTail, indexOf, isEmpty, iterator, lastIndexOf, remove, remove, removeFirst, removeLast, set, size, toString |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait |
AppendableList
public AppendableList()
merge
public void merge(AppendableList l)
- Provides a constant time function that merges the contents
of two lists by appending l to this list. The lists are
merged by appending the contents of l to the contents of this
list.
- Parameters:
l
- The list to be merged into this list- Postcondition:
- This list contains all of the elements previously
contained by l.
l is destroyed.