| java.lang.Object rcm.util.History
History | public class History (Code) | | |
Inner Class :class HistoryEnumeration implements Enumeration | |
Constructor Summary | |
public | History(int max) Make a History. | public | History(History h) Make a duplicate of another History. |
Method Summary | |
public void | add(Object obj) Add an object to the end of the history, moving the current point to it. | public Object | back() Move back one object in the history, if possible. | public Enumeration | backElements() Get the objects BEFORE the current object. | public boolean | canBack() Test whether back() will succeed. | public boolean | canForward() Test whether forward() will succeed. | public void | clear() Clear the history. | public boolean | contains(Object obj) Test whether history already contains an object. | public Enumeration | elements() Get the objects in the history. | public 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) | public Object | forward() Move forward one object in the history, if possible. | public Enumeration | forwardElements() Get the objects AFTER the current object. | public Object | get() Get the current object of the history. | public boolean | isEmpty() Test whether history is empty. | public boolean | isFull() Test whether history is full. | public Object | peekBack() Get the object that would be returned by back(), without actually
changing the current object. | public Object | peekForward() Get the object that would be returned by forward(), without actually
changing the current object. | public void | put(Object obj) Add an object to the history after the current point (deleting all
objects forward of this point). | public void | replace(Object obj) Replace the current object of the history. | public Object | toEnd() Move to last (newest) object in the history, if possible. | public Object | toStart() Move to first (oldest) object in the history, if possible. |
start | protected int start(Code) | | |
History | public History(int max)(Code) | | Make a History.
Parameters: max - Maximum length of history |
History | public History(History h)(Code) | | Make a duplicate of another History.
Parameters: h - History to copy |
add | public void add(Object obj)(Code) | | Add an object to the end of the history, moving the current point to it.
If history overflows, the oldest object is thrown away.
Parameters: obj - Object to add to history |
back | public Object back()(Code) | | Move back one object in the history, if possible.
previous object in the history, or null if at start. |
backElements | public Enumeration backElements()(Code) | | Get the objects BEFORE the current object.
|
canBack | public boolean canBack()(Code) | | Test whether back() will succeed.
true if and only if there are objects before the current object |
canForward | public boolean canForward()(Code) | | Test whether forward() will succeed.
true if and only if there are objects after the current object |
clear | public void clear()(Code) | | Clear the history.
|
contains | public boolean contains(Object obj)(Code) | | Test whether history already contains an object.
Parameters: obj - Object to search for true if and only if history contains an object that equals() obj |
expand | public void expand()(Code) | | Double the capacity of the history.
|
fireAdded | protected void fireAdded(int i, int j)(Code) | | |
fireChanged | protected void fireChanged(int i, int j)(Code) | | |
fireRemoved | protected void fireRemoved(int i, int j)(Code) | | |
forward | public Object forward()(Code) | | Move forward one object in the history, if possible.
next object in the history, or null if at end of history. |
forwardElements | public Enumeration forwardElements()(Code) | | Get the objects AFTER the current object.
|
get | public Object get()(Code) | | Get the current object of the history.
current object of history, or null if history is empty. |
isEmpty | public boolean isEmpty()(Code) | | Test whether history is empty.
true if and only if history contains no objects |
isFull | public boolean isFull()(Code) | | Test whether history is full.
true if and only if history contains max objects |
peekBack | public Object peekBack()(Code) | | Get the object that would be returned by back(), without actually
changing the current object.
object before current object, or null if at beginning of history or history is empty. |
peekForward | public Object peekForward()(Code) | | Get the object that would be returned by forward(), without actually
changing the current object.
object after current object, or null if at end of history or history is empty. |
put | public void put(Object obj)(Code) | | Add an object to the history after the current point (deleting all
objects forward of this point). If history overflows, the oldest
object is thrown away.
Parameters: obj - Object to add to history |
replace | public void replace(Object obj)(Code) | | Replace the current object of the history. The rest of the history
is unaffected, and the current pointer stays where it is.
If the history is empty,
then this call is equivalent to put(obj).
Parameters: obj - object to substitute |
toEnd | public Object toEnd()(Code) | | Move to last (newest) object in the history, if possible.
last object in the history, or null if history empty. |
toStart | public Object toStart()(Code) | | Move to first (oldest) object in the history, if possible.
first object in the history, or null if history empty. |
|
|