|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rcm.util.History
Field Summary | |
protected int |
curr
|
static Debug |
debug
|
protected int |
end
|
protected java.lang.Object[] |
history
|
protected int |
start
|
Constructor Summary | |
History(History h)
Make a duplicate of another History. |
|
History(int max)
Make a History. |
Method Summary | |
void |
add(java.lang.Object obj)
Add an object to the end of the history, moving the current point to it. |
java.lang.Object |
back()
Move back one object in the history, if possible. |
java.util.Enumeration |
backElements()
Get the objects BEFORE the current object. |
boolean |
canBack()
Test whether back() will succeed. |
boolean |
canForward()
Test whether forward() will succeed. |
void |
clear()
Clear the history. |
boolean |
contains(java.lang.Object obj)
Test whether history already contains an object. |
java.util.Enumeration |
elements()
Get the objects in the history. |
void |
expand()
Double the capacity of the history. |
protected void |
fireAdded(int i,
int j)
|
protected void |
fireChanged(int i,
int j)
|
protected void |
fireRemoved(int i,
int j)
|
java.lang.Object |
forward()
Move forward one object in the history, if possible. |
java.util.Enumeration |
forwardElements()
Get the objects AFTER the current object. |
java.lang.Object |
get()
Get the current object of the history. |
boolean |
isEmpty()
Test whether history is empty. |
boolean |
isFull()
Test whether history is full. |
java.lang.Object |
peekBack()
Get the object that would be returned by back(), without actually changing the current object. |
java.lang.Object |
peekForward()
Get the object that would be returned by forward(), without actually changing the current object. |
void |
put(java.lang.Object obj)
Add an object to the history after the current point (deleting all objects forward of this point). |
void |
replace(java.lang.Object obj)
Replace the current object of the history. |
java.lang.Object |
toEnd()
Move to last (newest) object in the history, if possible. |
java.lang.Object |
toStart()
Move to first (oldest) object in the history, if possible. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static Debug debug
protected java.lang.Object[] history
protected int start
protected int end
protected int curr
Constructor Detail |
public History(int max)
max
- Maximum length of historypublic History(History h)
h
- History to copyMethod Detail |
public void clear()
public void expand()
public void put(java.lang.Object obj)
obj
- Object to add to historypublic void add(java.lang.Object obj)
obj
- Object to add to historypublic java.lang.Object get()
public java.lang.Object peekBack()
public java.lang.Object peekForward()
public void replace(java.lang.Object obj)
If the history is empty, then this call is equivalent to put(obj).
obj
- object to substitutepublic java.lang.Object back()
public java.lang.Object forward()
public java.lang.Object toStart()
public java.lang.Object toEnd()
public boolean canBack()
public boolean canForward()
public boolean isEmpty()
public boolean isFull()
public boolean contains(java.lang.Object obj)
obj
- Object to search forpublic java.util.Enumeration elements()
public java.util.Enumeration forwardElements()
public java.util.Enumeration backElements()
protected void fireRemoved(int i, int j)
protected void fireAdded(int i, int j)
protected void fireChanged(int i, int j)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |