uk.ac.man.cs.rainbow.simulator
Class Register
java.lang.Object
|
+--uk.ac.man.cs.rainbow.simulator.Register
- All Implemented Interfaces:
- Serializable
- public class Register
- extends Object
- implements Serializable
Registers for use by Rainbow threads.
- See Also:
- Serialized Form
Inner Class Summary |
static class |
Register.Data
Registers can be first class data values. |
Register
public Register(String name)
- Create a new register. The register will initially contain the
unknown data value. If you want the register to contain a
structured data value, then you must initialise it
yourself using an instance of the right type of data.
- Parameters:
name
- The name of the register to create. Names do not need to be
globally unique.- See Also:
UnknownData
,
RASM.MakeRegister
,
RASM.Load
,
RASM.Store
getContents
public Data getContents()
- Read the register.
getName
public String getName()
- Get the name of the register.
setContents
public void setContents(Data contents)
- Assign to the register.
- Parameters:
contents
- The value to assign.
toString
public String toString()
- Overrides:
toString
in class Object