package jp.sourceforge.cfneo.at4ie2.api.browser.impl.ie;

import jp.sourceforge.cfneo.at4ie2.BTRuntimeError;
import jp.sourceforge.cfneo.at4ie2.api.browser.MonoRadio;
import watij.elements.Radio;

public class BTMonoRadio implements MonoRadio {

	Radio radio;

	BTMonoRadio(Radio radio) {
		this.radio = radio;
	}

	@Override
	public void checked() {
		try {
			this.radio.set();
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}
	@Override
	public String getValue() {
		try {
			return this.radio.value();
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}
	@Override
	public String getId() {
		try {
			return this.radio.id();
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}
	@Override
	public String getName() {
		try {
			return this.radio.name();
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}
	@Override
	public boolean exists() {
		try {
			return this.radio.exists();
		} catch (Exception e) {
			throw new BTRuntimeError(e);
		}
	}

}
