Package org.evrete.api
Class FactBuilder
- java.lang.Object
-
- org.evrete.api.FactBuilder
-
public final class FactBuilder extends Object
A fact declaration for
RuleBuilder. Fact type can be specified both as a JavaClassor as a type name.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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 Detail
-
fact
public static FactBuilder fact(String name, String type)
'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
public static FactBuilder fact(String name, Class<?> type)
'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
public String getName()
The fact's variable name
- Returns:
- fact's variable name
-
getUnresolvedType
public String getUnresolvedType()
Returns fact's type as String
- Returns:
- fact's String type or
nullif the fact is declared as Java class.
-
getResolvedType
public 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.
-
-