docs/ 0040755 0000071 0000534 00000000000 10212533510 0012215 5 ustar 00weiss user 0000444 0012026 docs/resources/ 0040755 0000071 0000534 00000000000 10212533324 0014232 5 ustar 00weiss user 0000444 0012026 docs/resources/inherit.gif 0100644 0000071 0000534 00000000071 10212533324 0016356 0 ustar 00weiss user 0000444 0012026 GIF89a , DrjԐ;߀Q@N ; docs/weiss/ 0040755 0000071 0000534 00000000000 10212533320 0013346 5 ustar 00weiss user 0000444 0012026 docs/weiss/nonstandard/ 0040755 0000071 0000534 00000000000 10212533401 0015661 5 ustar 00weiss user 0000444 0012026 docs/weiss/nonstandard/AATree.html 0100644 0000071 0000534 00000035612 10212533327 0017663 0 ustar 00weiss user 0000444 0012026
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object weiss.nonstandard.AATree<AnyType>
public class AATree<AnyType extends java.lang.Comparable<? super AnyType>>
Implements an AA-tree. Note that all "matching" is based on the compareTo method.
Constructor Summary | |
---|---|
AATree()
Construct the tree. |
Method Summary | |
---|---|
AnyType |
find(AnyType x)
Find an item in the tree. |
AnyType |
findMax()
Find the largest item in the tree. |
AnyType |
findMin()
Find the smallest item in the tree. |
void |
insert(AnyType x)
Insert into the tree. |
boolean |
isEmpty()
Test if the tree is logically empty. |
static void |
main(java.lang.String[] args)
|
void |
makeEmpty()
Make the tree logically empty. |
void |
remove(AnyType x)
Remove from the tree. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AATree()
Method Detail |
---|
public void insert(AnyType x)
x
- the item to insert.
DuplicateItemException
- if x is already present.public void remove(AnyType x)
x
- the item to remove.
ItemNotFoundException
- if x is not found.public AnyType findMin()
public AnyType findMax()
public AnyType find(AnyType x)
x
- the item to search for.
public void makeEmpty()
public boolean isEmpty()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object weiss.nonstandard.ArrayQueue<AnyType>
public class ArrayQueue<AnyType>
Array-based implementation of the queue.
Constructor Summary | |
---|---|
ArrayQueue()
Construct the queue. |
Method Summary | |
---|---|
AnyType |
dequeue()
Return and remove the least recently inserted item from the queue. |
void |
enqueue(AnyType x)
Insert a new item into the queue. |
AnyType |
getFront()
Get the least recently inserted item in the queue. |
boolean |
isEmpty()
Test if the queue is logically empty. |
void |
makeEmpty()
Make the queue logically empty. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArrayQueue()
Method Detail |
---|
public boolean isEmpty()
isEmpty
in interface Queue<AnyType>
public void makeEmpty()
makeEmpty
in interface Queue<AnyType>
public AnyType dequeue()
dequeue
in interface Queue<AnyType>
UnderflowException
- if the queue is empty.public AnyType getFront()
getFront
in interface Queue<AnyType>
UnderflowException
- if the queue is empty.public void enqueue(AnyType x)
enqueue
in interface Queue<AnyType>
x
- the item to insert.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |