org.matheclipse.core.generic
Class Predicates
- java.lang.Object
-
- org.matheclipse.core.generic.Predicates
-
public class Predicates extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static Predicate<IExpr>in(IAST ast)Returns a predicate that evaluates totrueif the object reference being tested is one of the arguments of the givenast.static Predicate<IExpr>in(IExpr expr)Returns a predicate that evaluates totrueif the object reference being tested is one of the arguments of the givenast.static Predicate<IExpr>isAST(ISymbol[] heads)Returns a predicate that evaluates totrueif theinputis an AST list, which contains one of the given header elements at index position0.static Predicate<IExpr>isNumber()Returns a predicate that evaluates totrueifinput.isNumber()givestrue.static Predicate<IExpr>isNumeric()Returns a predicate that evaluates totrueifinput.isNumeric()givestrue.static Predicate<IExpr>isPattern()Returns a predicate that evaluates totrueif the input is aninstanceof IPattern.static Predicate<IExpr>isSignedNumber()Returns a predicate that evaluates totrueifinput.isSignedNumber()givestrue.static Predicate<IExpr>isTrue(EvalEngine engine, IExpr head)Check if the evaluation of an unary AST object givesTrue.static Predicate<IExpr>isTrue(IExpr head)Check if the evaluation of an unary AST object givesTrue.
-
-
-
Method Detail
-
isTrue
public static Predicate<IExpr> isTrue(IExpr head)
Check if the evaluation of an unary AST object givesTrue.- Parameters:
head-- Returns:
-
isTrue
public static Predicate<IExpr> isTrue(EvalEngine engine, IExpr head)
Check if the evaluation of an unary AST object givesTrue.- Parameters:
engine-head-- Returns:
-
in
public static Predicate<IExpr> in(IAST ast)
Returns a predicate that evaluates totrueif the object reference being tested is one of the arguments of the givenast. It does not defensively copy the collection passed in, so future changes to it will alter the behavior of the predicate.- Parameters:
ast- the AST those arguments may contain the function input
-
in
public static Predicate<IExpr> in(IExpr expr)
Returns a predicate that evaluates totrueif the object reference being tested is one of the arguments of the givenast. It does not defensively copy the collection passed in, so future changes to it will alter the behavior of the predicate.- Parameters:
expr- the expr which may macth the function input
-
isPattern
public static Predicate<IExpr> isPattern()
Returns a predicate that evaluates totrueif the input is aninstanceof IPattern.- Returns:
-
isNumber
public static Predicate<IExpr> isNumber()
Returns a predicate that evaluates totrueifinput.isNumber()givestrue.- Returns:
-
isNumeric
public static Predicate<IExpr> isNumeric()
Returns a predicate that evaluates totrueifinput.isNumeric()givestrue.- Returns:
-
isSignedNumber
public static Predicate<IExpr> isSignedNumber()
Returns a predicate that evaluates totrueifinput.isSignedNumber()givestrue.- Returns:
-
-
DMelt 3.0 © DataMelt by jWork.ORG