Class ConditionalTransformation
- java.lang.Object
-
- it.bancaditalia.oss.vtl.impl.transform.TransformationImpl
-
- it.bancaditalia.oss.vtl.impl.transform.bool.ConditionalTransformation
-
- All Implemented Interfaces:
Transformation
,Serializable
- Direct Known Subclasses:
NvlTransformation
public class ConditionalTransformation extends TransformationImpl
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Transformation
condition
protected Transformation
elseExpr
protected Transformation
thenExpr
-
Constructor Summary
Constructors Constructor Description ConditionalTransformation(Transformation condition, Transformation trueExpr, Transformation falseExpr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Lineage
computeLineage()
VTLValueMetadata
computeMetadata(TransformationScheme scheme)
boolean
equals(Object obj)
VTLValue
eval(TransformationScheme session)
Evaluates this transformation in the context of the givenTransformationScheme
.Transformation
getCondition()
Transformation
getElseExpr()
VTLValueMetadata
getMetadata(TransformationScheme scheme)
Checks and returns the metadata of thisTransformation
within the givenTransformationScheme
.Set<LeafTransformation>
getTerminals()
A set of all theLeafTransformation
s recursively referenced by thisTransformation
.Transformation
getThenExpr()
int
hashCode()
boolean
isTerminal()
String
toString()
-
Methods inherited from class it.bancaditalia.oss.vtl.impl.transform.TransformationImpl
getLineage
-
-
-
-
Field Detail
-
condition
protected final Transformation condition
-
thenExpr
protected final Transformation thenExpr
-
elseExpr
protected final Transformation elseExpr
-
-
Constructor Detail
-
ConditionalTransformation
public ConditionalTransformation(Transformation condition, Transformation trueExpr, Transformation falseExpr)
-
-
Method Detail
-
eval
public VTLValue eval(TransformationScheme session)
Description copied from interface:Transformation
Evaluates this transformation in the context of the givenTransformationScheme
.- Parameters:
session
- the transformation scheme- Returns:
- the result of the computation of this
Transformation
.
-
isTerminal
public boolean isTerminal()
- Returns:
- True if this
Transformation
do not require previous computations before returning a result.
-
getTerminals
public Set<LeafTransformation> getTerminals()
Description copied from interface:Transformation
A set of all theLeafTransformation
s recursively referenced by thisTransformation
. The set is empty ifTransformation.isTerminal()
is true.- Returns:
- the set
-
getMetadata
public VTLValueMetadata getMetadata(TransformationScheme scheme)
Description copied from interface:Transformation
Checks and returns the metadata of thisTransformation
within the givenTransformationScheme
.- Parameters:
scheme
- the transformation scheme- Returns:
- the metadata of this
Transformation
.
-
computeMetadata
public VTLValueMetadata computeMetadata(TransformationScheme scheme)
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceTransformation
- Specified by:
hashCode
in classTransformationImpl
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceTransformation
- Specified by:
equals
in classTransformationImpl
-
computeLineage
public Lineage computeLineage()
- Specified by:
computeLineage
in classTransformationImpl
-
getCondition
public Transformation getCondition()
-
getThenExpr
public Transformation getThenExpr()
-
getElseExpr
public Transformation getElseExpr()
-
-