org.smartfrog.sfcore.languages.sf.functions
Class BaseUnaryOperator
java.lang.Object
org.smartfrog.sfcore.languages.sf.functions.BaseFunction
org.smartfrog.sfcore.languages.sf.functions.BaseUnaryOperator
- All Implemented Interfaces:
- Function
- Direct Known Subclasses:
- Not
public abstract class BaseUnaryOperator
- extends BaseFunction
Defines the base functionality for the unary operator functions.
The data on which to operate is defined to be the attribute "data".
|
Field Summary |
static java.lang.String |
DATA_ATTRIBUTE
Name of the attribute used for unary operators
"data" |
|
Method Summary |
protected java.lang.Object |
doFunction()
Implements the functionality of base unary operator. |
protected abstract java.lang.Object |
doOperator(java.lang.Object a)
The method to implement the functionality of any operator. |
| Methods inherited from class org.smartfrog.sfcore.languages.sf.functions.BaseFunction |
doit |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DATA_ATTRIBUTE
public static final java.lang.String DATA_ATTRIBUTE
- Name of the attribute used for unary operators
"data"
- See Also:
- Constant Field Values
BaseUnaryOperator
public BaseUnaryOperator()
doOperator
protected abstract java.lang.Object doOperator(java.lang.Object a)
throws SmartFrogCompileResolutionException
- The method to implement the functionality of any operator.
- Parameters:
a - Object 1 for operator
- Returns:
- an Object
- Throws:
SmartFrogCompileResolutionException
doFunction
protected java.lang.Object doFunction()
throws SmartFrogCompileResolutionException
- Implements the functionality of base unary operator.
- Specified by:
doFunction in class BaseFunction
- Returns:
- the result of applying the operator
- Throws:
SmartFrogCompileResolutionException - if the attribute "data" does not exist or the operator throws the exception
(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP