net.sf.arise.piji.fun
Class AbstractCompareFunction
java.lang.Object
|
+--net.sf.arise.piji.AbstractFunction
|
+--net.sf.arise.piji.fun.AbstractCompareFunction
- All Implemented Interfaces:
- Function
- Direct Known Subclasses:
- EqualsFunction, GreaterThanEqualFunction, GreaterThanFunction, LessThanEqualFunction, LessThanFunction
- public abstract class AbstractCompareFunction
- extends AbstractFunction
< is the Comparable less-than operator. Takes two or
more arguments. Also works on numbers.
- Author:
- Kjetil Valstadsve
|
Method Summary |
java.lang.Object |
apply(Context context,
Expression[] args)
Applies the function to a set of values in a given context
and returns the result |
protected abstract boolean |
compareFailed(java.lang.Object last,
java.lang.Object value)
|
protected boolean |
requiresComparable()
|
| Methods inherited from class net.sf.arise.piji.AbstractFunction |
checkArgumentCount, checkLeaf, checkLeaf, checkList, checkList, checkString, checkString, checkSymbol, checkSymbol, checkSymbol, checkSymbol, fillContext, fillContext, getArgumentCount, getContext, getDocumentationString, isLeaf, isList, isString, isSymbol, isVararg |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractCompareFunction
public AbstractCompareFunction(java.lang.String docString,
Context ctx)
requiresComparable
protected boolean requiresComparable()
compareFailed
protected abstract boolean compareFailed(java.lang.Object last,
java.lang.Object value)
apply
public java.lang.Object apply(Context context,
Expression[] args)
throws java.lang.Throwable
- Description copied from interface:
Function
- Applies the function to a set of values in a given context
and returns the result
- Specified by:
apply in interface Function- Specified by:
apply in class AbstractFunction
- Parameters:
context - The context to apply this function in
- Returns:
- The result of the function applied to the arguments in
the context
java.lang.Throwable
All code and documentation is
Copyright (c) : 2000-2003 Kjetil Valstadsve & Maja S. Bratseth