Package org.drools.compiler.lang.descr
Class LiteralRestrictionDescr
- java.lang.Object
-
- org.drools.compiler.lang.descr.BaseDescr
-
- org.drools.compiler.lang.descr.RestrictionDescr
-
- org.drools.compiler.lang.descr.EvaluatorBasedRestrictionDescr
-
- org.drools.compiler.lang.descr.LiteralRestrictionDescr
-
- All Implemented Interfaces:
Externalizable
,Serializable
,org.drools.core.rule.Namespaceable
public class LiteralRestrictionDescr extends EvaluatorBasedRestrictionDescr
This represents a literal node in the rule language. This is a constraint on a single field of a pattern. The "text" contains the content.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
TYPE_BOOLEAN
static int
TYPE_NULL
static int
TYPE_NUMBER
static int
TYPE_STRING
-
Constructor Summary
Constructors Constructor Description LiteralRestrictionDescr()
LiteralRestrictionDescr(String evaluator, boolean isNegated, String text)
LiteralRestrictionDescr(String evaluator, boolean isNegated, String parameterText, String text, int type)
LiteralRestrictionDescr(String evaluator, boolean isNegated, List<String> parameters, String text, int type)
LiteralRestrictionDescr(String evaluator, String text)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getType()
Object
getValue()
void
setType(int type)
String
toString()
-
Methods inherited from class org.drools.compiler.lang.descr.EvaluatorBasedRestrictionDescr
getEvaluator, getParameters, getParameterText, isNegated, setEvaluator, setNegated, setParameters
-
Methods inherited from class org.drools.compiler.lang.descr.BaseDescr
accept, copyLocation, getColumn, getEndCharacter, getEndColumn, getEndLine, getLine, getNamespace, getResource, getStartCharacter, getText, negate, positionAsString, readExternal, replaceVariable, setEndCharacter, setEndLocation, setLocation, setNamespace, setResource, setStartCharacter, setText, writeExternal
-
-
-
-
Field Detail
-
TYPE_NULL
public static final int TYPE_NULL
- See Also:
- Constant Field Values
-
TYPE_NUMBER
public static final int TYPE_NUMBER
- See Also:
- Constant Field Values
-
TYPE_STRING
public static final int TYPE_STRING
- See Also:
- Constant Field Values
-
TYPE_BOOLEAN
public static final int TYPE_BOOLEAN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LiteralRestrictionDescr
public LiteralRestrictionDescr()
-
LiteralRestrictionDescr
public LiteralRestrictionDescr(String evaluator, boolean isNegated, String text)
-
LiteralRestrictionDescr
public LiteralRestrictionDescr(String evaluator, boolean isNegated, String parameterText, String text, int type)
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toString
in classEvaluatorBasedRestrictionDescr
-
getType
public int getType()
-
setType
public void setType(int type)
-
getValue
public Object getValue()
-
-