org.etlunit.parser.ETLTestVariableImpl Maven / Gradle / Ivy
package org.etlunit.parser;
public class ETLTestVariableImpl extends ETLTestAnnotatedImpl implements ETLTestVariable
{
private final String name;
private final ETLTestValueObject value;
private final value_type valueType;
public ETLTestVariableImpl(String n, ETLTestValueObject v)
{
name = n;
value = v;
switch (v.getValueType())
{
case literal:
valueType = value_type.assignment;
break;
case list:
case object:
case quoted_string:
default:
valueType = value_type.literal;
break;
}
}
public ETLTestVariableImpl(String n, ETLTestValueObject v, Token t)
{
super(t);
name = n;
value = v;
switch (v.getValueType())
{
case literal:
valueType = value_type.assignment;
break;
case list:
case object:
case quoted_string:
default:
valueType = value_type.literal;
break;
}
}
@Override
public String getName()
{
return name;
}
@Override
public ETLTestValueObject getValue()
{
return value;
}
@Override
public value_type getValueType()
{
return valueType;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy