de.cau.cs.kieler.sim.table.views
Class TableData

java.lang.Object
  extended by de.cau.cs.kieler.sim.table.views.TableData

public class TableData
extends Object

The class TableData implements a single data entry that represents a variable or signal within the data table. If it is a signal, then it can be present or absent. An entry always contains of a key and a value String expression.

Rating red

Constructor Summary
TableData(TableDataList parentTableDataList)
          Instantiates a new TableData entry.
TableData(TableDataList parentTableDataList, boolean presentParam, boolean signalParam, String keyParam, String valueParam)
          Instantiates a new TableData.
TableData(TableDataList parentTableDataList, boolean presentParam, String keyParam, String valueParam)
          Instantiates a new TableData.
TableData(TableDataList parentTableDataList, String keyParam)
          Instantiates a new TableData entry.
TableData(TableDataList parentTableDataList, String keyParam, String valueParam)
          Instantiates a new TableData entry.
 
Method Summary
 String getKey()
          Gets the key of the entry.
 TableDataList getParentTableDataList()
          Gets the parent TableDataList.
 String getValue()
          Gets the value of the entry.
 boolean isModified()
          Checks whether entry is flagged as modified.
 boolean isPermanent()
          Checks whether entry is flagged as permanent.
 boolean isPresent()
          Checks whether the signal is present (for signal entries only).
 boolean isSignal()
          Checks whether the entry is a signal.
 void setKey(String keyParam)
          Sets the key of the entry.
 void setModified(boolean modifiedParam)
          Sets the modified flag of an entry.
 void setPermanent(boolean permanentParam)
          Sets the permanent flag of an entry.
 void setPresent(boolean presentParam)
          Sets the present flag (for signal entries only).
 void setSignal(boolean signalParam)
          Sets the signal flag of an entry.
 void setValue(String valueParam)
          Sets the value of the entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableData

public TableData(TableDataList parentTableDataList)
Instantiates a new TableData entry.

Parameters:
parentTableDataList - the parent TableDataList

TableData

public TableData(TableDataList parentTableDataList,
                 String keyParam)
Instantiates a new TableData entry.

Parameters:
parentTableDataList - the parent TableDataList
keyParam - the key of the entry

TableData

public TableData(TableDataList parentTableDataList,
                 String keyParam,
                 String valueParam)
Instantiates a new TableData entry.

Parameters:
parentTableDataList - the parent TableDataList
keyParam - the key of the entry
valueParam - the value of the entry

TableData

public TableData(TableDataList parentTableDataList,
                 boolean presentParam,
                 String keyParam,
                 String valueParam)
Instantiates a new TableData.

Parameters:
parentTableDataList - the parent TableDataList
presentParam - the present flag of the entry
keyParam - the key of the entry
valueParam - the value of the entry

TableData

public TableData(TableDataList parentTableDataList,
                 boolean presentParam,
                 boolean signalParam,
                 String keyParam,
                 String valueParam)
Instantiates a new TableData.

Parameters:
parentTableDataList - the parent TableDataList
presentParam - the present flag of the entry
signalParam - the signal flag of the entry
keyParam - the key of the entry
valueParam - the value of the entry
Method Detail

getParentTableDataList

public TableDataList getParentTableDataList()
Gets the parent TableDataList.

Returns:
the parent TableDataList

getValue

public String getValue()
Gets the value of the entry.

Returns:
the value

getKey

public String getKey()
Gets the key of the entry.

Returns:
the key

setValue

public void setValue(String valueParam)
Sets the value of the entry.

Parameters:
valueParam - the new value

setKey

public void setKey(String keyParam)
            throws Exception
Sets the key of the entry.

Parameters:
keyParam - the new key
Throws:
Exception - the exception if the key already exists in the parent TableDataList

setPresent

public void setPresent(boolean presentParam)
Sets the present flag (for signal entries only).

Parameters:
presentParam - the new present

isPresent

public boolean isPresent()
Checks whether the signal is present (for signal entries only).

Returns:
true, if signal is present

setSignal

public void setSignal(boolean signalParam)
Sets the signal flag of an entry.

Parameters:
signalParam - true, if entry is a signal

isSignal

public boolean isSignal()
Checks whether the entry is a signal.

Returns:
true, if entry is a signal

setModified

public void setModified(boolean modifiedParam)
Sets the modified flag of an entry.

Parameters:
modifiedParam - true, if entry was modified

isModified

public boolean isModified()
Checks whether entry is flagged as modified.

Returns:
true, entry is modified

setPermanent

public void setPermanent(boolean permanentParam)
Sets the permanent flag of an entry.

Parameters:
permanentParam - true, if entry is permanent

isPermanent

public boolean isPermanent()
Checks whether entry is flagged as permanent.

Returns:
true, if entry is permanent