package ru.yandex.wmtools.common.data.wrappers;

import ru.yandex.wmtools.common.data.info.EmailInfo;
import ru.yandex.wmtools.common.util.XmlDataWrapper;

/**
 * @author Andrey Mima (amima@yandex-team.ru)
 */
public class ValidatorWrapper extends XmlDataWrapper<EmailInfo> {
    public ValidatorWrapper(EmailInfo data) {
        super(data, "address", "validated", data.isValid() ? "valid" : "no");
    }

    @Override
    protected void doToXml(StringBuilder result) {
        result.append(data.getAddress());
    }
}
