org.drools.lang.descr
Class ConnectiveDescr

java.lang.Object
  extended by org.drools.lang.descr.BaseDescr
      extended by org.drools.lang.descr.RestrictionDescr
          extended by org.drools.lang.descr.ConnectiveDescr
All Implemented Interfaces:
Externalizable, Serializable

public class ConnectiveDescr
extends RestrictionDescr

This is used to connect restrictions together for a single field eg: age < 40 & > 30

See Also:
Serialized Form

Nested Class Summary
static class ConnectiveDescr.RestrictionConnectiveType
          The connective types that can be used for a restriction
 
Field Summary
static ConnectiveDescr.RestrictionConnectiveType AND
           
static ConnectiveDescr.RestrictionConnectiveType OR
           
 
Constructor Summary
ConnectiveDescr(ConnectiveDescr.RestrictionConnectiveType connective)
           
 
Method Summary
 void add(ConnectiveDescr restriction)
           
 void add(String restriction)
           
 void buildExpression(StringBuilder sb)
           
 ConnectiveDescr.RestrictionConnectiveType getConnective()
           
 String getPrefix()
           
 List<Object> getRestrictions()
           
 boolean isParen()
           
 void setParen(boolean paren)
           
 void setPrefix(String prefix)
           
 String toString()
           
 
Methods inherited from class org.drools.lang.descr.BaseDescr
getColumn, getEndCharacter, getEndColumn, getEndLine, getLine, getStartCharacter, getText, readExternal, setEndCharacter, setEndLocation, setLocation, setStartCharacter, setText, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AND

public static final ConnectiveDescr.RestrictionConnectiveType AND

OR

public static final ConnectiveDescr.RestrictionConnectiveType OR
Constructor Detail

ConnectiveDescr

public ConnectiveDescr(ConnectiveDescr.RestrictionConnectiveType connective)
Method Detail

getConnective

public ConnectiveDescr.RestrictionConnectiveType getConnective()

isParen

public boolean isParen()

setParen

public void setParen(boolean paren)

getPrefix

public String getPrefix()

setPrefix

public void setPrefix(String prefix)

add

public void add(ConnectiveDescr restriction)

add

public void add(String restriction)

getRestrictions

public List<Object> getRestrictions()

buildExpression

public void buildExpression(StringBuilder sb)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.