|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.util.Fn
public final class Fn
Function utilities
Collect
,
Strings
,
Util.makeInstance(Class)
,
Util.makeInstance(Class, Object...)
Field Summary | |
---|---|
static Predicate1 |
alwaysFalse
A predicate that returns false for any object. |
static Predicate1 |
alwaysTrue
A predicate that returns true for any object. |
static Function1 |
identity
The identity function. |
Method Summary | |
---|---|
static Function1 |
accessor(java.lang.Class c,
java.lang.String methodName)
Returns a function that calls the 0-argument method specified by a class and method name. |
static Function1 |
always(java.lang.Object value)
Returns a function that always returns the same value. |
static java.lang.Object |
apply(java.lang.Object object,
java.lang.reflect.Method meth,
java.lang.Object[] arguments)
Calls the indicated method. |
static java.lang.Object |
apply(java.lang.Object object,
java.lang.String methodName,
java.util.List arguments)
Calls the indicated method. |
static java.lang.Object |
apply(java.lang.Object object,
java.lang.String methodName,
java.lang.Object[] arguments)
Calls the indicated method. |
static java.lang.Object |
applyStatic(java.lang.Class c,
java.lang.String methodName,
java.util.List arguments)
Calls the indicated static method. |
static java.lang.Object |
applyStatic(java.lang.Class c,
java.lang.String methodName,
java.lang.Object[] arguments)
Calls the indicated static method. |
static java.lang.reflect.Method |
getMethod(java.lang.Class c,
java.lang.String methodName,
java.lang.Class[] argSig)
Returns the specified method if it exists, else null. |
static java.lang.reflect.Method |
getMethod(java.lang.Object object,
java.lang.String methodName,
java.lang.Object[] arguments)
Returns the specified method if it exists, else null. |
static Predicate1 |
isInstanceOf(java.lang.Class c)
Returns a predicate that test whether an object is an instance of the specified class. |
static Predicate1 |
negate(Predicate1 p)
Returns a predicate that returns false when the given predicate returns true, and true when it returns false. |
static java.lang.Class |
objectClass(java.lang.Class type)
Maps primitive classes (TYPEs) to the corresponding object classes, and other classes to themselves. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Predicate1 alwaysTrue
public static final Predicate1 alwaysFalse
public static final Function1 identity
Method Detail |
---|
public static java.lang.Object apply(java.lang.Object object, java.lang.String methodName, java.util.List arguments)
getMethod(Class c, String methodName, Class[] argSig)
public static java.lang.Object apply(java.lang.Object object, java.lang.String methodName, java.lang.Object[] arguments)
getMethod(Class c, String methodName, Class[] argSig)
public static java.lang.Object apply(java.lang.Object object, java.lang.reflect.Method meth, java.lang.Object[] arguments)
public static java.lang.Object applyStatic(java.lang.Class c, java.lang.String methodName, java.util.List arguments)
getMethod(Class c, String methodName, Class[] argSig)
public static java.lang.Object applyStatic(java.lang.Class c, java.lang.String methodName, java.lang.Object[] arguments)
getMethod(Class c, String methodName, Class[] argSig)
public static java.lang.reflect.Method getMethod(java.lang.Object object, java.lang.String methodName, java.lang.Object[] arguments)
getMethod(Class c, String methodName, Class[] argSig)
public static java.lang.reflect.Method getMethod(java.lang.Class c, java.lang.String methodName, java.lang.Class[] argSig)
public static java.lang.Class objectClass(java.lang.Class type)
public static Function1 accessor(java.lang.Class c, java.lang.String methodName)
public static Function1 always(java.lang.Object value)
public static Predicate1 negate(Predicate1 p)
public static Predicate1 isInstanceOf(java.lang.Class c)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |