org.shapelogic.logic
Interface Task<T>

All Superinterfaces:
Calc0<T>, CalcInvoke<T>, CalcValue<T>, java.lang.Iterable<com.google.inject.Module>, org.apache.commons.jexl.JexlContext, LazyCalc<T>, javax.swing.tree.TreeNode
All Known Implementing Classes:
AndTask, BaseTask, BooleanTask, CalcAndSetTask, CalcAndSetTasks, CountCollectionGreaterTask, CountCollectionTask, ExistTask, ExistTasks, FilterCountGreaterTask, FilterCountTask, NumericGreaterTask, ParametricRuleTask, RootTask, SimpleNumericTask, SimpleTask, XOrTask

public interface Task<T>
extends javax.swing.tree.TreeNode, org.apache.commons.jexl.JexlContext, CalcInvoke<T>, java.lang.Iterable<com.google.inject.Module>

Author:
Sami Badawi

Method Summary
 java.lang.Object calcNextSubTask()
           
 void doPrintOnFail()
           
 java.lang.String errorOnFail()
           
 java.lang.Object findNamedValue(java.lang.String name)
           
 java.lang.Object findNamedValueUsingSubTasks(java.lang.String name)
           
 org.apache.commons.jexl.JexlContext getContext()
           
 ContextCalculation getContextCalculation(java.lang.String name)
           
 java.util.Map<java.lang.String,ContextCalculation> getContextCalculationMap()
           
 com.google.inject.Injector getInjector()
           
 float getInterest()
           
 LogicState getLastSubTaskState()
           
 org.apache.commons.jexl.JexlContext getLocalContext()
           
 com.google.inject.Module getLocalModule()
           
 org.apache.commons.jexl.JexlContext getLowestContext()
           
 java.lang.String getName()
           
 Task getNamedTask(java.lang.String name)
           
 java.lang.Object getNamedValue(java.lang.String name)
           
 Task getParentTask()
           
 long getPathWork()
          measured in milliseconds
 float getScore()
           
 javax.swing.tree.TreeNode getSelfTreeNode()
          Needed if TreeNode gets taken out of this interface
 long getSelfWork()
          measured in milliseconds
 long getSelfWorkEstimate()
           
 LogicState getState()
           
 T getValue()
          Starts a lazy calculation.
 boolean isPrintOnFail()
           
 java.util.Iterator<com.google.inject.Module> iterator()
           
 T mainCalc()
           
 boolean match()
           
 void postCalc()
           
 void preCalc()
           
 void setClassInContext(java.lang.Class klass)
           
 void setClassInContext(java.lang.Class[] classes)
           
 void setClassInContext(java.util.Collection<java.lang.Class> classes)
           
 void setContextCalculation(java.lang.String name, ContextCalculation contextCalculation)
           
 void setInterest(float interest)
           
 void setName(java.lang.String name)
           
 void setNamedTask(java.lang.String name, Task task)
           
 void setNamedValue(java.lang.String name, java.lang.Object value)
           
 void setPrintOnFail(boolean PrintOnFail)
           
 void setState(LogicState state)
           
 
Methods inherited from interface javax.swing.tree.TreeNode
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf
 
Methods inherited from interface org.apache.commons.jexl.JexlContext
getVars, setVars
 
Methods inherited from interface org.shapelogic.calculation.LazyCalc
isDirty, setup
 
Methods inherited from interface org.shapelogic.calculation.Calc0
invoke
 

Method Detail

getState

LogicState getState()

setState

void setState(LogicState state)

getPathWork

long getPathWork()
measured in milliseconds


getSelfWork

long getSelfWork()
measured in milliseconds


getSelfWorkEstimate

long getSelfWorkEstimate()

getInterest

float getInterest()

setInterest

void setInterest(float interest)

getScore

float getScore()

getContext

org.apache.commons.jexl.JexlContext getContext()

getLocalContext

org.apache.commons.jexl.JexlContext getLocalContext()

getLowestContext

org.apache.commons.jexl.JexlContext getLowestContext()

getParentTask

Task getParentTask()

getSelfTreeNode

javax.swing.tree.TreeNode getSelfTreeNode()
Needed if TreeNode gets taken out of this interface


preCalc

void preCalc()

mainCalc

T mainCalc()

postCalc

void postCalc()

match

boolean match()
              throws java.lang.Exception
Throws:
java.lang.Exception

getLocalModule

com.google.inject.Module getLocalModule()

iterator

java.util.Iterator<com.google.inject.Module> iterator()
Specified by:
iterator in interface java.lang.Iterable<com.google.inject.Module>

getInjector

com.google.inject.Injector getInjector()

getContextCalculation

ContextCalculation getContextCalculation(java.lang.String name)

setContextCalculation

void setContextCalculation(java.lang.String name,
                           ContextCalculation contextCalculation)

setClassInContext

void setClassInContext(java.lang.Class klass)

setClassInContext

void setClassInContext(java.util.Collection<java.lang.Class> classes)

setClassInContext

void setClassInContext(java.lang.Class[] classes)

getNamedValue

java.lang.Object getNamedValue(java.lang.String name)

findNamedValue

java.lang.Object findNamedValue(java.lang.String name)

findNamedValueUsingSubTasks

java.lang.Object findNamedValueUsingSubTasks(java.lang.String name)

setNamedValue

void setNamedValue(java.lang.String name,
                   java.lang.Object value)

getContextCalculationMap

java.util.Map<java.lang.String,ContextCalculation> getContextCalculationMap()

calcNextSubTask

java.lang.Object calcNextSubTask()

getNamedTask

Task getNamedTask(java.lang.String name)

setNamedTask

void setNamedTask(java.lang.String name,
                  Task task)

getValue

T getValue()
Description copied from interface: CalcValue
Starts a lazy calculation. If dirty do calc() else return cached value. This should maybe be moved up in the hierarchy

Specified by:
getValue in interface CalcValue<T>

getName

java.lang.String getName()

setName

void setName(java.lang.String name)

getLastSubTaskState

LogicState getLastSubTaskState()

errorOnFail

java.lang.String errorOnFail()

doPrintOnFail

void doPrintOnFail()

setPrintOnFail

void setPrintOnFail(boolean PrintOnFail)

isPrintOnFail

boolean isPrintOnFail()


Copyright © 2008. All Rights Reserved.