Algernon Software

org.algernon.aam.register
Interface Register

All Known Implementing Classes:
BindingsRegister, GeneralRegister

public interface Register

This class prescribes the behavior of a register in the AAM processor. User: hewett Date: Sep 17, 2002 Time: 12:06:28 PM


Method Summary
 LispValue append(LispValue newValue)
          Appends the given value onto the end of the register.
 void clear()
          Initializes the register contents to an appropriate value, usually NIL or the empty set.
 LispValue getEntry(int index)
          Return the nth entry in the given register, where the topmost item is entry number zero.
 String getName()
          Returns the name of this Register.
 RegisterSet getRegisterSet()
          Returns the RegisterSet this Register belongs to.
 LispValue getValue()
          Return the value of the given register.
 LispValue pop()
          Pops the register and returns the popped entry.
 LispValue push(LispValue newValue)
          Pushes the given value onto the register.
 void setName(String newName)
          Sets the name of this Register.
 void setRegisterSet(RegisterSet set)
          Sets the RegisterSet this Register belongs to.
 LispValue setValue(LispValue newValue)
          Sets the value of the given register.
 long size()
          Return the size of (number of entries in) the given register.
 

Method Detail

clear

public void clear()
Initializes the register contents to an appropriate value, usually NIL or the empty set.


getName

public String getName()
Returns the name of this Register.


setName

public void setName(String newName)
Sets the name of this Register.


getRegisterSet

public RegisterSet getRegisterSet()
Returns the RegisterSet this Register belongs to.


setRegisterSet

public void setRegisterSet(RegisterSet set)
Sets the RegisterSet this Register belongs to.


getValue

public LispValue getValue()
Return the value of the given register.


setValue

public LispValue setValue(LispValue newValue)
                   throws AlgernonDataException
Sets the value of the given register. Returns the value.

Throws:
AlgernonDataException

getEntry

public LispValue getEntry(int index)
Return the nth entry in the given register, where the topmost item is entry number zero.


pop

public LispValue pop()
Pops the register and returns the popped entry.


push

public LispValue push(LispValue newValue)
Pushes the given value onto the register. Returns the new value of the register.


append

public LispValue append(LispValue newValue)
Appends the given value onto the end of the register. Returns the new value of the register.


size

public long size()
Return the size of (number of entries in) the given register.


Algernon Software