Package org.drools.compiler.lang.descr
Class RestrictionConnectiveDescr
- java.lang.Object
-
- org.drools.compiler.lang.descr.BaseDescr
-
- org.drools.compiler.lang.descr.RestrictionDescr
-
- org.drools.compiler.lang.descr.RestrictionConnectiveDescr
-
- All Implemented Interfaces:
Externalizable
,Serializable
,org.drools.core.rule.Namespaceable
public class RestrictionConnectiveDescr extends RestrictionDescr
This is used to connect restrictions together for a single field eg: age < 40 & > 30- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static ConnectiveDescr.RestrictionConnectiveType
AND
static ConnectiveDescr.RestrictionConnectiveType
OR
-
Constructor Summary
Constructors Constructor Description RestrictionConnectiveDescr()
RestrictionConnectiveDescr(ConnectiveDescr.RestrictionConnectiveType connective)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOrMerge(RestrictionDescr restriction)
void
addRestriction(RestrictionDescr restriction)
ConnectiveDescr.RestrictionConnectiveType
getConnective()
List<RestrictionDescr>
getRestrictions()
void
readExternal(ObjectInput in)
String
toString()
void
writeExternal(ObjectOutput out)
-
Methods inherited from class org.drools.compiler.lang.descr.BaseDescr
accept, copyLocation, getColumn, getEndCharacter, getEndColumn, getEndLine, getLine, getNamespace, getResource, getStartCharacter, getText, isNegated, negate, positionAsString, replaceVariable, setEndCharacter, setEndLocation, setLocation, setNamespace, setResource, setStartCharacter, setText
-
-
-
-
Field Detail
-
AND
public static final ConnectiveDescr.RestrictionConnectiveType AND
-
OR
public static final ConnectiveDescr.RestrictionConnectiveType OR
-
-
Constructor Detail
-
RestrictionConnectiveDescr
public RestrictionConnectiveDescr()
-
RestrictionConnectiveDescr
public RestrictionConnectiveDescr(ConnectiveDescr.RestrictionConnectiveType connective)
-
-
Method Detail
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classBaseDescr
- Throws:
IOException
ClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classBaseDescr
- Throws:
IOException
-
getConnective
public ConnectiveDescr.RestrictionConnectiveType getConnective()
-
addRestriction
public void addRestriction(RestrictionDescr restriction)
-
addOrMerge
public void addOrMerge(RestrictionDescr restriction)
-
getRestrictions
public List<RestrictionDescr> getRestrictions()
-
-