SmartFrog 3.10.000

org.smartfrog.sfcore.languages.sf.functions
Class BaseUnaryOperator

java.lang.Object
  extended by org.smartfrog.sfcore.languages.sf.functions.BaseFunction
      extended by 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"
 
Fields inherited from class org.smartfrog.sfcore.languages.sf.functions.BaseFunction
context, name
 
Constructor Summary
BaseUnaryOperator()
           
 
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
 

Field Detail

DATA_ATTRIBUTE

public static final java.lang.String DATA_ATTRIBUTE
Name of the attribute used for unary operators "data"

See Also:
Constant Field Values
Constructor Detail

BaseUnaryOperator

public BaseUnaryOperator()
Method Detail

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

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP