

package org.oic.simulator;

class StringValueValidator implements
        AttributeValueVisitor.VisitingMethods<Boolean> {

    private StringProperty mProperty = null;

    StringValueValidator(StringProperty property) {
        mProperty = property;
    }

    public boolean validate(AttributeValue value) {
        AttributeValueVisitor visitor = new AttributeValueVisitor(value, this);
        return (Boolean) visitor.visit();
    }

    @Override
    public Boolean visitingValue(Integer value) {
        return false;
    }

    @Override
    public Boolean visitingValue(Double value) {
        return false;
    }

    @Override
    public Boolean visitingValue(Boolean value) {
        return false;
    }

    @Override
    public Boolean visitingValue(String value) {
        if (null != mProperty)
            return mProperty.validate(value);
        return false;
    }

    @Override
    public Boolean visitingValue(SimulatorResourceModel value) {
        return false;
    }

    @Override
    public Boolean visitingValue(Integer[] value) {
        return false;
    }

    @Override
    public Boolean visitingValue(Double[] value) {
        return false;
    }

    @Override
    public Boolean visitingValue(Boolean[] value) {
        return false;
    }

    @Override
    public Boolean visitingValue(String[] value) {
        return false;
    }

    @Override
    public Boolean visitingValue(SimulatorResourceModel[] value) {
        return false;
    }

    @Override
    public Boolean visitingValue(Integer[][] value) {
        return false;
    }

    @Override
    public Boolean visitingValue(Double[][] value) {
        return false;
    }

    @Override
    public Boolean visitingValue(Boolean[][] value) {
        return false;
    }

    @Override
    public Boolean visitingValue(String[][] value) {
        return false;
    }

    @Override
    public Boolean visitingValue(SimulatorResourceModel[][] value) {
        return false;
    }

    @Override
    public Boolean visitingValue(Integer[][][] value) {
        return false;
    }

    @Override
    public Boolean visitingValue(Double[][][] value) {
        return false;
    }

    @Override
    public Boolean visitingValue(Boolean[][][] value) {
        return false;
    }

    @Override
    public Boolean visitingValue(String[][][] value) {
        return false;
    }

    @Override
    public Boolean visitingValue(SimulatorResourceModel[][][] value) {
        return false;
    }
}
