Package gnu.kawa.functions
Class NumberPredicate
- java.lang.Object
-
- gnu.mapping.PropertySet
-
- gnu.mapping.Procedure
-
- gnu.mapping.Procedure1
-
- gnu.kawa.functions.NumberPredicate
-
- All Implemented Interfaces:
Named
public class NumberPredicate extends Procedure1
-
-
Field Summary
Fields Modifier and Type Field Description static int
EVEN
static int
ODD
-
Fields inherited from class gnu.mapping.Procedure1
applyToObject
-
Fields inherited from class gnu.mapping.Procedure
applyMethodType, applyToConsumerDefault, applyToConsumerMethod, applyToObjectDefault, applyToObjectMethod, compilerKey, compilerXKey, inlineIfConstantSymbol, validateApplyKey, validateXApplyKey
-
Fields inherited from class gnu.mapping.PropertySet
nameKey
-
-
Constructor Summary
Constructors Constructor Description NumberPredicate(Language language, String name, int op)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
apply1(Object arg1)
protected Language
getLanguage()
static boolean
isEven(Object obj)
static boolean
isOdd(Object obj)
static boolean
isOddEven(boolean isOdd, Object obj)
int
numArgs()
ReturnminArgs()|(maxArgs<<12)
.-
Methods inherited from class gnu.mapping.Procedure1
apply0, apply2, apply3, apply4, applyN, applyToObject
-
Methods inherited from class gnu.mapping.Procedure
applyL, applyToConsumerDefault, applyToObjectDefault, checkArgCount, checkBadCode, getApplyMethod, getApplyToConsumerMethod, getApplyToObjectMethod, getReturnType, getSetter, getSourceLocation, isSideEffectFree, lookupApplyHandle, maxArgs, maxArgs, minArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation, toString
-
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
-
-
-
-
Field Detail
-
ODD
public static final int ODD
- See Also:
- Constant Field Values
-
EVEN
public static final int EVEN
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLanguage
protected final Language getLanguage()
-
isOdd
public static boolean isOdd(Object obj)
-
isEven
public static boolean isEven(Object obj)
-
isOddEven
public static boolean isOddEven(boolean isOdd, Object obj)
-
apply1
public Object apply1(Object arg1)
- Specified by:
apply1
in classProcedure1
-
numArgs
public int numArgs()
Description copied from class:Procedure
ReturnminArgs()|(maxArgs<<12)
. We use a single virtual function to reduce the number of methods in the system, as well as the number of virtual method table entries. We shift by 12 so the number can normally be represented using a sipush instruction, without requiring a constant pool entry.- Overrides:
numArgs
in classProcedure1
-
-