org.drools.lang.descr
Class EvaluatorBasedRestrictionDescr

java.lang.Object
  extended by org.drools.lang.descr.BaseDescr
      extended by org.drools.lang.descr.RestrictionDescr
          extended by org.drools.lang.descr.EvaluatorBasedRestrictionDescr
All Implemented Interfaces:
Externalizable, Serializable
Direct Known Subclasses:
LiteralRestrictionDescr, QualifiedIdentifierRestrictionDescr, ReturnValueRestrictionDescr, VariableRestrictionDescr

public class EvaluatorBasedRestrictionDescr
extends RestrictionDescr

This is a super class for all restrictions that are based on evaluators.

See Also:
Serialized Form

Constructor Summary
EvaluatorBasedRestrictionDescr()
          Creates a new EvaluatorBasedRestriction
EvaluatorBasedRestrictionDescr(String evaluator, boolean isNegated, List<String> parameters)
          Creates a new EvaluatorBasedRestriction
EvaluatorBasedRestrictionDescr(String evaluator, boolean isNegated, String parameterText)
          Creates a new EvaluatorBasedRestriction
 
Method Summary
 String getEvaluator()
          Returns the evaluator ID for this restriction
 List<String> getParameters()
           
 String getParameterText()
          In case there is any parameter text, this method returns it.
 boolean isNegated()
          Returns true if this evaluator is boolean negated.
 void setEvaluator(String evaluator)
          Sets the evaluator ID for this restriction
 void setNegated(boolean negated)
          Sets if this evaluator is negated.
 void setParameters(List<String> parameters)
           
 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
 

Constructor Detail

EvaluatorBasedRestrictionDescr

public EvaluatorBasedRestrictionDescr()
Creates a new EvaluatorBasedRestriction


EvaluatorBasedRestrictionDescr

public EvaluatorBasedRestrictionDescr(String evaluator,
                                      boolean isNegated,
                                      String parameterText)
Creates a new EvaluatorBasedRestriction

Parameters:
evaluator - the evaluator ID to be used in this restriction
isNegated - true if the evaluator is boolean negated
parameterText - the parameter text, in case there is any. null otherwise.

EvaluatorBasedRestrictionDescr

public EvaluatorBasedRestrictionDescr(String evaluator,
                                      boolean isNegated,
                                      List<String> parameters)
Creates a new EvaluatorBasedRestriction

Parameters:
evaluator - the evaluator ID to be used in this restriction
isNegated - true if the evaluator is boolean negated
parameterText - the list of parameters texts, in case there is any. null otherwise.
Method Detail

getEvaluator

public String getEvaluator()
Returns the evaluator ID for this restriction

Returns:

isNegated

public boolean isNegated()
Returns true if this evaluator is boolean negated. Example: "contains" is boolean negated if you want to check the elements that are not contained ("not contains")

Returns:
the negated

getParameterText

public String getParameterText()
In case there is any parameter text, this method returns it. Returns null otherwise. A parameter text is evaluator parameters like "after[1,10]". In the previous example, the parameter text will be "1,10".

Returns:
the parameterText

getParameters

public List<String> getParameters()

setParameters

public void setParameters(List<String> parameters)

setEvaluator

public void setEvaluator(String evaluator)
Sets the evaluator ID for this restriction


setNegated

public void setNegated(boolean negated)
Sets if this evaluator is negated. Example: "contains" is boolean negated if you want to check the elements that are not contained ("not contains")

Parameters:
negated - the negated

toString

public String toString()
Overrides:
toString in class Object


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