Class If
- java.lang.Object
-
- org.opencds.cqf.cql.engine.elm.execution.Executable
-
- org.cqframework.cql.elm.execution.Element
-
- org.cqframework.cql.elm.execution.Expression
-
- org.cqframework.cql.elm.execution.If
-
- All Implemented Interfaces:
org.jvnet.jaxb2_commons.lang.Equals2,org.jvnet.jaxb2_commons.lang.HashCode2,org.jvnet.jaxb2_commons.lang.ToString2
- Direct Known Subclasses:
IfEvaluator
public class If extends Expression implements org.jvnet.jaxb2_commons.lang.Equals2, org.jvnet.jaxb2_commons.lang.HashCode2, org.jvnet.jaxb2_commons.lang.ToString2
The If operator evaluates a condition, and returns the then argument if the condition evaluates to true; if the condition evaluates to false or null, the result of the else argument is returned. The static type of the then argument determines the result type of the conditional, and the else argument must be of that same type.Java class for If complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="If"> <complexContent> <extension base="{urn:hl7-org:elm:r1}Expression"> <sequence> <element name="condition" type="{urn:hl7-org:elm:r1}Expression"/> <element name="then" type="{urn:hl7-org:elm:r1}Expression"/> <element name="else" type="{urn:hl7-org:elm:r1}Expression"/> </sequence> </extension> </complexContent> </complexType>
-
-
Field Summary
Fields Modifier and Type Field Description protected Expression_elseprotected Expressionconditionprotected Expressionthen-
Fields inherited from class org.cqframework.cql.elm.execution.Element
annotation, localId, locator, resultTypeName, resultTypeSpecifier
-
-
Constructor Summary
Constructors Constructor Description If()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringBuilderappend(org.jvnet.jaxb2_commons.locator.ObjectLocator locator, java.lang.StringBuilder buffer, org.jvnet.jaxb2_commons.lang.ToStringStrategy2 strategy)java.lang.StringBuilderappendFields(org.jvnet.jaxb2_commons.locator.ObjectLocator locator, java.lang.StringBuilder buffer, org.jvnet.jaxb2_commons.lang.ToStringStrategy2 strategy)booleanequals(java.lang.Object object)booleanequals(org.jvnet.jaxb2_commons.locator.ObjectLocator thisLocator, org.jvnet.jaxb2_commons.locator.ObjectLocator thatLocator, java.lang.Object object, org.jvnet.jaxb2_commons.lang.EqualsStrategy2 strategy)ExpressiongetCondition()Gets the value of the condition property.ExpressiongetElse()Gets the value of the else property.ExpressiongetThen()Gets the value of the then property.inthashCode()inthashCode(org.jvnet.jaxb2_commons.locator.ObjectLocator locator, org.jvnet.jaxb2_commons.lang.HashCodeStrategy2 strategy)voidsetCondition(Expression value)Sets the value of the condition property.voidsetElse(Expression value)Sets the value of the else property.voidsetThen(Expression value)Sets the value of the then property.java.lang.StringtoString()IfwithAnnotation(java.util.Collection<CqlToElmBase> values)IfwithAnnotation(CqlToElmBase... values)IfwithCondition(Expression value)IfwithElse(Expression value)IfwithLocalId(java.lang.String value)IfwithLocator(java.lang.String value)IfwithResultTypeName(javax.xml.namespace.QName value)IfwithResultTypeSpecifier(TypeSpecifier value)IfwithThen(Expression value)-
Methods inherited from class org.cqframework.cql.elm.execution.Element
getAnnotation, getLocalId, getLocator, getResultTypeName, getResultTypeSpecifier, setLocalId, setLocator, setResultTypeName, setResultTypeSpecifier
-
Methods inherited from class org.opencds.cqf.cql.engine.elm.execution.Executable
evaluate, internalEvaluate
-
-
-
-
Field Detail
-
condition
protected Expression condition
-
then
protected Expression then
-
_else
protected Expression _else
-
-
Method Detail
-
getCondition
public Expression getCondition()
Gets the value of the condition property.- Returns:
- possible object is
Expression
-
setCondition
public void setCondition(Expression value)
Sets the value of the condition property.- Parameters:
value- allowed object isExpression
-
getThen
public Expression getThen()
Gets the value of the then property.- Returns:
- possible object is
Expression
-
setThen
public void setThen(Expression value)
Sets the value of the then property.- Parameters:
value- allowed object isExpression
-
getElse
public Expression getElse()
Gets the value of the else property.- Returns:
- possible object is
Expression
-
setElse
public void setElse(Expression value)
Sets the value of the else property.- Parameters:
value- allowed object isExpression
-
withCondition
public If withCondition(Expression value)
-
withThen
public If withThen(Expression value)
-
withElse
public If withElse(Expression value)
-
withAnnotation
public If withAnnotation(CqlToElmBase... values)
- Overrides:
withAnnotationin classExpression
-
withAnnotation
public If withAnnotation(java.util.Collection<CqlToElmBase> values)
- Overrides:
withAnnotationin classExpression
-
withResultTypeSpecifier
public If withResultTypeSpecifier(TypeSpecifier value)
- Overrides:
withResultTypeSpecifierin classExpression
-
withLocalId
public If withLocalId(java.lang.String value)
- Overrides:
withLocalIdin classExpression
-
withLocator
public If withLocator(java.lang.String value)
- Overrides:
withLocatorin classExpression
-
withResultTypeName
public If withResultTypeName(javax.xml.namespace.QName value)
- Overrides:
withResultTypeNamein classExpression
-
equals
public boolean equals(org.jvnet.jaxb2_commons.locator.ObjectLocator thisLocator, org.jvnet.jaxb2_commons.locator.ObjectLocator thatLocator, java.lang.Object object, org.jvnet.jaxb2_commons.lang.EqualsStrategy2 strategy)- Specified by:
equalsin interfaceorg.jvnet.jaxb2_commons.lang.Equals2- Overrides:
equalsin classExpression
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classExpression
-
hashCode
public int hashCode(org.jvnet.jaxb2_commons.locator.ObjectLocator locator, org.jvnet.jaxb2_commons.lang.HashCodeStrategy2 strategy)- Specified by:
hashCodein interfaceorg.jvnet.jaxb2_commons.lang.HashCode2- Overrides:
hashCodein classExpression
-
hashCode
public int hashCode()
- Overrides:
hashCodein classExpression
-
toString
public java.lang.String toString()
- Overrides:
toStringin classExpression
-
append
public java.lang.StringBuilder append(org.jvnet.jaxb2_commons.locator.ObjectLocator locator, java.lang.StringBuilder buffer, org.jvnet.jaxb2_commons.lang.ToStringStrategy2 strategy)- Specified by:
appendin interfaceorg.jvnet.jaxb2_commons.lang.ToString2- Overrides:
appendin classExpression
-
appendFields
public java.lang.StringBuilder appendFields(org.jvnet.jaxb2_commons.locator.ObjectLocator locator, java.lang.StringBuilder buffer, org.jvnet.jaxb2_commons.lang.ToStringStrategy2 strategy)- Specified by:
appendFieldsin interfaceorg.jvnet.jaxb2_commons.lang.ToString2- Overrides:
appendFieldsin classExpression
-
-