Drools :: Core 6.1.0.Beta1

org.drools.core.util
Class KieFunctions

java.lang.Object
  extended by org.drools.core.util.KieFunctions

public class KieFunctions
extends Object

This class contains a set of utility functions that were created with the aim to be used in the context of a process's action scripts and conditions scripts. To make the life of the script programmer easier. This class will be automatically imported by the platform when process script related classes are generated. So the user don't have to take care of import this class. An example of use of this class in a process condition script can be something like this. return KieFunctions.isTrue(approved) && !KieFunctions.equals(invoiceType, "external") && KieFunctions.greaterThan(amount, "15000");


Constructor Summary
KieFunctions()
           
 
Method Summary
static boolean between(Number number, String minValue, String maxValue)
           
static boolean contains(String string, String value)
           
static boolean endsWith(String string, String value)
           
static boolean equalsTo(Number number, String value)
           
static boolean equalsTo(String string, String value)
           
static boolean greaterOrEqualThan(Number number, String value)
           
static boolean greaterThan(Number number, String value)
           
static boolean isEmpty(String string)
           
static boolean isFalse(Boolean value)
           
static boolean isNull(Object object)
           
static boolean isTrue(Boolean value)
           
static boolean lessOrEqualThan(Number number, String value)
           
static boolean lessThan(Number number, String value)
           
static boolean startsWith(String string, String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KieFunctions

public KieFunctions()
Method Detail

isNull

public static boolean isNull(Object object)

equalsTo

public static boolean equalsTo(Number number,
                               String value)

equalsTo

public static boolean equalsTo(String string,
                               String value)

isEmpty

public static boolean isEmpty(String string)

contains

public static boolean contains(String string,
                               String value)

startsWith

public static boolean startsWith(String string,
                                 String value)

endsWith

public static boolean endsWith(String string,
                               String value)

greaterThan

public static boolean greaterThan(Number number,
                                  String value)

greaterOrEqualThan

public static boolean greaterOrEqualThan(Number number,
                                         String value)

lessThan

public static boolean lessThan(Number number,
                               String value)

lessOrEqualThan

public static boolean lessOrEqualThan(Number number,
                                      String value)

between

public static boolean between(Number number,
                              String minValue,
                              String maxValue)

isTrue

public static boolean isTrue(Boolean value)

isFalse

public static boolean isFalse(Boolean value)

Drools :: Core 6.1.0.Beta1

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.