org.problets.domain.model.implement
Class AskItem

java.lang.Object
  extended by org.problets.domain.line.AbstractLine
      extended by org.problets.domain.model.implement.DataTraceItem
          extended by org.problets.domain.model.implement.AskItem
All Implemented Interfaces:
java.lang.Cloneable

public class AskItem
extends DataTraceItem
implements java.lang.Cloneable

Represents an ASK item in data trace

Author:
Amruth Kumar

Field Summary
 
Fields inherited from class org.problets.domain.line.AbstractLine
UNASSIGNED_LINE
 
Constructor Summary
AskItem(AbstractVarModel inVariable, int inLineNumber)
           
 
Method Summary
 boolean canEdit()
          Returns whether this object can be edited
 java.lang.Object clone()
          Clones the AskItem
 TellItem getPreviousTell()
          Gets a reference to the most recent tell for this item
 java.util.Vector getPreviousTellValueDifference()
          Gets a value difference of the previous tell of the ask item with respect to the ask item's variable.
 boolean isAltered()
          Returns true if the item's variable has been altered since creation
static void main(java.lang.String[] args)
           
 void reset()
          Sets the value of an 'ask' item's variable at itemIndex to either blank, or to the value of the most recent 'tell' item for that variable that appears before the given 'ask'.
 void setAltered(boolean aAltered)
          Sets the altered flag that is true if the item's variable has been altered.
 void setPreviousTell(TellItem a_previous)
          Sets the previous tell of this item
 
Methods inherited from class org.problets.domain.model.implement.DataTraceItem
cloneVariableValues, getDataTraceItem, getVariable, print, setVariable, toString, varsEqual
 
Methods inherited from class org.problets.domain.line.AbstractLine
getLineNumber, setLineNumber
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AskItem

public AskItem(AbstractVarModel inVariable,
               int inLineNumber)
Method Detail

clone

public java.lang.Object clone()
Clones the AskItem

Overrides:
clone in class DataTraceItem
Returns:
the cloned item

canEdit

public boolean canEdit()
Returns whether this object can be edited

Specified by:
canEdit in class DataTraceItem

isAltered

public boolean isAltered()
Returns true if the item's variable has been altered since creation

Returns:
false if the view hasn't been altered

getPreviousTell

public TellItem getPreviousTell()
Gets a reference to the most recent tell for this item


getPreviousTellValueDifference

public java.util.Vector getPreviousTellValueDifference()
Gets a value difference of the previous tell of the ask item with respect to the ask item's variable.


setAltered

public void setAltered(boolean aAltered)
Sets the altered flag that is true if the item's variable has been altered.

Parameters:
a_altered - the new value of the altered variable

setPreviousTell

public void setPreviousTell(TellItem a_previous)
Sets the previous tell of this item

Parameters:
a_previous - the previous tell

reset

public void reset()
Sets the value of an 'ask' item's variable at itemIndex to either blank, or to the value of the most recent 'tell' item for that variable that appears before the given 'ask'.

Overrides:
reset in class DataTraceItem
Parameters:
itemIndex - the index of the ask to reset the values for
dataTrace - the data trace vector that the ask belongs to

main

public static void main(java.lang.String[] args)