Package org.evrete.api
Class FactBuilder
java.lang.Object
org.evrete.api.FactBuilder
public class FactBuilder extends Object
A fact declaration for RuleBuilder. Fact type can be specified
both as a Java Class or as a type name.
-
Method Summary
Modifier and Type Method Description static FactBuilderfact(String name, Class<?> type)'import static' this method for brevity of fact declarations.static FactBuilderfact(String name, String type)'import static' this method for brevity of fact declarations.StringgetName()The fact's variable nameClass<?>getResolvedType()Returns fact's type as Java ClassStringgetUnresolvedType()Returns fact's type as String
-
Method Details
-
fact
'import static' this method for brevity of fact declarations.
- Parameters:
name- fact type's reference variabletype- fact's type name- Returns:
- returns new FactBuilder
- Throws:
NullPointerException- if any of the parameters is null
-
fact
'import static' this method for brevity of fact declarations.
- Parameters:
name- fact type's reference variabletype- fact's Java class- Returns:
- returns new FactBuilder
- Throws:
NullPointerException- if any of the parameters is null
-
getName
The fact's variable name
- Returns:
- fact's variable name
-
getUnresolvedType
Returns fact's type as String
- Returns:
- fact's String type or
nullif the fact is declared as Java class.
-
getResolvedType
Returns fact's type as Java Class
- Returns:
- fact's declared Class or
nullif the fact's type is declared as named type.
-