Simple Machine

machine
Class Register

java.lang.Object
  extended by java.util.Observable
      extended by util.AbstractDataModel
          extended by machine.Register
All Implemented Interfaces:
DataModel

public class Register
extends AbstractDataModel


Nested Class Summary
static class Register.ClockTransition
          Specifics the type of action register takes when the clock ticks.
 class Register.InputPort
          Register's input port.
 class Register.NonClockedPort
          Register's non-clocked port value.
 class Register.OutputPort
          Register's output port.
 class Register.Port
          Register's value port.
 class Register.TimingException
          Indicates that CPU implementation has read from the register's input port, but no value was written to that port.
 
Method Summary
 int get()
           
 Class getColumnClass(int columnIndex)
           
 int getColumnCount()
           
 String getColumnName(int columnIndex)
           
 int getInput()
           
 Register.InputPort getInputPort()
          Get the register's input-port object.
 int getInputUnsigned()
           
 String getName()
           
 Register.NonClockedPort getNonClockedPort()
          Get the register's simplified value port object.
 Register.OutputPort getOutputPort()
          Get the register's output-port object.
 Register.Port getPort()
          Get the register's value port object.
 int getRowCount()
           
 int getUnsigned()
           
 Object getValueAt(int rowIndex, int columnIndex)
           
 boolean isCellEditable(int rowIndex, int columnIndex)
           
 void set(long aValue)
           
 void setValueAt(Object aValue, int rowIndex, int columnIndex)
           
 void setValueAtByUser(Object aValue, int rowIndex, int columnIndex)
           
 void tickClock(Register.ClockTransition transition)
           
 boolean valueEquals(Register anotherRegister)
           
 
Methods inherited from class util.AbstractDataModel
addUndoableEditListener, canDeleteRow, canInsertRow, deleteRow, insertRow, setValueAt, setValueAtByUser, tellObservers, tellObservers
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface util.DataModel
addObserver
 

Method Detail

getPort

public Register.Port getPort()
Get the register's value port object.


getNonClockedPort

public Register.NonClockedPort getNonClockedPort()
Get the register's simplified value port object.


getOutputPort

public Register.OutputPort getOutputPort()
Get the register's output-port object.


getInputPort

public Register.InputPort getInputPort()
Get the register's input-port object.


valueEquals

public boolean valueEquals(Register anotherRegister)

getName

public String getName()

set

public void set(long aValue)

get

public int get()

getUnsigned

public int getUnsigned()

getInput

public int getInput()
             throws Register.TimingException
Throws:
Register.TimingException

getInputUnsigned

public int getInputUnsigned()
                     throws Register.TimingException
Throws:
Register.TimingException

tickClock

public void tickClock(Register.ClockTransition transition)

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface DataModel
Overrides:
getColumnCount in class AbstractDataModel

getColumnClass

public Class getColumnClass(int columnIndex)
Specified by:
getColumnClass in interface DataModel
Overrides:
getColumnClass in class AbstractDataModel

getColumnName

public String getColumnName(int columnIndex)
Specified by:
getColumnName in interface DataModel
Overrides:
getColumnName in class AbstractDataModel

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface DataModel
Overrides:
getRowCount in class AbstractDataModel

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)
Specified by:
getValueAt in interface DataModel
Overrides:
getValueAt in class AbstractDataModel

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Specified by:
isCellEditable in interface DataModel
Overrides:
isCellEditable in class AbstractDataModel

setValueAt

public void setValueAt(Object aValue,
                       int rowIndex,
                       int columnIndex)
Specified by:
setValueAt in interface DataModel
Overrides:
setValueAt in class AbstractDataModel

setValueAtByUser

public void setValueAtByUser(Object aValue,
                             int rowIndex,
                             int columnIndex)
Specified by:
setValueAtByUser in interface DataModel
Overrides:
setValueAtByUser in class AbstractDataModel

Simple Machine

Copyright © 2010, 2011 Mike Feeley. All Rights Reserved.