org.sahagin.share.srctree.code.StringCode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sahagin Show documentation
Show all versions of sahagin Show documentation
Sahagin makes your Selenium script more readable and maintainable.
The newest version!
package org.sahagin.share.srctree.code;
import java.util.Map;
import org.sahagin.share.yaml.YamlConvertException;
import org.sahagin.share.yaml.YamlUtils;
public class StringCode extends Code {
public static final String TYPE = "string";
private String value;
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
@Override
protected String getType() {
return TYPE;
}
@Override
public Map toYamlObject() {
Map result = super.toYamlObject();
result.put("value", value);
return result;
}
@Override
public void fromYamlObject(Map yamlObject)
throws YamlConvertException {
super.fromYamlObject(yamlObject);
value = YamlUtils.getStrValue(yamlObject, "value");
}
}