package ru.yandex.webmaster3.storage.util.clickhouse2.query.methods;

import ru.yandex.webmaster3.storage.util.clickhouse2.query.cases.Case;

/**
 * @author tsyplyaev
 */
public class Condition implements Method {
    private final Case case_;
    private final Object a, b;

    public Condition(Case case_, Object a, Object b) {
        this.case_= case_;
        this.a = a;
        this.b = b;
    }

    @Override
    public String toString() {
        return "(" + case_.toString() + ") ? " + a.toString() + " : " + b.toString();
    }
}
