public abstract class JFunctorImpl extends Object implements JFunctor
Created by Jeff Gaynor
on 2/27/18 at 8:53 AM
Modifier and Type | Field and Description |
---|---|
protected ArrayList<Object> |
args |
protected boolean |
executed |
protected Object |
result |
protected FunctorType |
type |
Modifier | Constructor and Description |
---|---|
protected |
JFunctorImpl(FunctorType type) |
Modifier and Type | Method and Description |
---|---|
void |
addArg(Boolean x) |
void |
addArg(Integer x) |
void |
addArg(JFunctor x) |
void |
addArg(JSONFunctor x) |
void |
addArg(List<JFunctor> functors) |
void |
addArg(String x) |
protected void |
checkArgs()
This will check that there are args (assumes that the functor requires arguments and that each
argument in turn is a functor.
|
protected void |
checkArgs(boolean allowEmptyList) |
void |
clearState() |
ArrayList<Object> |
getArgs() |
boolean |
getBooleanResult() |
int |
getIntResult() |
List |
getListResult()
This will always return a list.
|
String |
getName() |
Object |
getResult() |
String |
getStringResult() |
boolean |
isExecuted() |
void |
reset()
This resets the entire state of the functor including erasing the argument list.
If you need to clear the executed state and re-run everything, consider invoking
clearState() . |
net.sf.json.JSONObject |
toJSON() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
execute
protected FunctorType type
protected boolean executed
protected Object result
protected JFunctorImpl(FunctorType type)
public boolean isExecuted()
public void clearState()
public void reset()
clearState()
.protected void checkArgs()
protected void checkArgs(boolean allowEmptyList)
public Object getResult()
getResult
in interface JMetaMetaFunctor
public List getListResult()
public boolean getBooleanResult()
public String getStringResult()
public int getIntResult()
public void addArg(JSONFunctor x)
public void addArg(Boolean x)
public net.sf.json.JSONObject toJSON()
toJSON
in interface JSONFunctor
Copyright © 2019. All Rights Reserved.