org.basex.util
Class Undo

java.lang.Object
  extended by org.basex.util.Undo

public final class Undo
extends Object

This class stores strings in a history.

Author:
Workgroup DBIS, University of Konstanz 2005-10, ISC License, Christian Gruen

Constructor Summary
Undo()
          Constructor.
 
Method Summary
 int cursor()
          Returns the cursor position.
 boolean first()
          Returns the previous string.
 boolean last()
          Returns the previous string.
 byte[] next()
          Returns the next string.
 byte[] prev()
          Returns the previous string.
 void reset(byte[] text)
          Resets the undo history with the specified text.
 void store(byte[] str, int c)
          Stores a string in the history.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Undo

public Undo()
Constructor.

Method Detail

first

public boolean first()
Returns the previous string.

Returns:
previous string

last

public boolean last()
Returns the previous string.

Returns:
previous string

prev

public byte[] prev()
Returns the previous string.

Returns:
previous string

next

public byte[] next()
Returns the next string.

Returns:
previous string

cursor

public int cursor()
Returns the cursor position.

Returns:
cursor position

store

public void store(byte[] str,
                  int c)
Stores a string in the history.

Parameters:
str - string to be stored
c - cursor position

reset

public void reset(byte[] text)
Resets the undo history with the specified text.

Parameters:
text - initial text