turingmachine
Class CTMData

java.lang.Object
  extended by turingmachine.CTMData
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CTMDataComment, CTMDataLink, CTMDataState, CTMDataTransition

abstract class CTMData
extends java.lang.Object
implements java.io.Serializable

The class that all CTMDocument viewable elements must inherit from.


Field Summary
private  CTMData mDataParent
          The parent data for this data, e.g.
private  boolean mDeleted
          Whether or not this object has been deleted.
private  CTMDocument mDocument
          The document this data belongs to.
private  int mModificationCount
          The count of modifications to this object.
(package private) static long serialVersionUID
          Serial id, so future version will load old files
 
Constructor Summary
CTMData(CTMDocument aDocument)
          Constructor.
CTMData(CTMDocument aDocument, CTMData aDataParent)
          Constructor.
 
Method Summary
 void delete()
          Set this data as being deleted.
 CTMData getDataParent()
          Get the document this state belongs to.
 CTMDocument getDocument()
          Get the document this state belongs to.
 int getModificationCount()
          Get this data's current modification value.
 boolean isDeleted()
          Has this data been deleted?
 void touch()
          Update this data's modification count to reflect some change in its sub-class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
Serial id, so future version will load old files

See Also:
Constant Field Values

mDocument

private CTMDocument mDocument
The document this data belongs to.


mModificationCount

private transient int mModificationCount
The count of modifications to this object.


mDeleted

private transient boolean mDeleted
Whether or not this object has been deleted.


mDataParent

private CTMData mDataParent
The parent data for this data, e.g. dataTransitions parent is dataLink.

Constructor Detail

CTMData

public CTMData(CTMDocument aDocument)
Constructor.

Parameters:
aDocument - The document this data belongs to.

CTMData

public CTMData(CTMDocument aDocument,
               CTMData aDataParent)
Constructor.

Parameters:
aDocument - The document this data belongs to.
mDataParent - Tha parent data of this data.
Method Detail

touch

public void touch()
Update this data's modification count to reflect some change in its sub-class.


getModificationCount

public int getModificationCount()
Get this data's current modification value.

Returns:
The current modification value.

delete

public void delete()
Set this data as being deleted.


isDeleted

public boolean isDeleted()
Has this data been deleted?

Returns:
true - yes, false - no.

getDataParent

public CTMData getDataParent()
Get the document this state belongs to.

Returns:
The document this state belongs to.

getDocument

public CTMDocument getDocument()
Get the document this state belongs to.

Returns:
The document this state belongs to.