Package org.drools.drl.ast.descr
Class RestrictionConnectiveDescr
- java.lang.Object
-
- org.drools.drl.ast.descr.BaseDescr
-
- org.drools.drl.ast.descr.RestrictionDescr
-
- org.drools.drl.ast.descr.RestrictionConnectiveDescr
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,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.RestrictionConnectiveTypeANDstatic ConnectiveDescr.RestrictionConnectiveTypeOR
-
Constructor Summary
Constructors Constructor Description RestrictionConnectiveDescr()RestrictionConnectiveDescr(ConnectiveDescr.RestrictionConnectiveType connective)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOrMerge(RestrictionDescr restriction)voidaddRestriction(RestrictionDescr restriction)ConnectiveDescr.RestrictionConnectiveTypegetConnective()java.util.List<RestrictionDescr>getRestrictions()voidreadExternal(java.io.ObjectInput in)java.lang.StringtoString()voidwriteExternal(java.io.ObjectOutput out)-
Methods inherited from class org.drools.drl.ast.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(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Overrides:
readExternalin classBaseDescr- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Overrides:
writeExternalin classBaseDescr- Throws:
java.io.IOException
-
getConnective
public ConnectiveDescr.RestrictionConnectiveType getConnective()
-
addRestriction
public void addRestriction(RestrictionDescr restriction)
-
addOrMerge
public void addOrMerge(RestrictionDescr restriction)
-
getRestrictions
public java.util.List<RestrictionDescr> getRestrictions()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-