FileDocCategorySizeDatePackage
EnumControl.javaAPI DocAndroid 1.5 API1965Wed May 06 22:41:02 BST 2009javax.sound.sampled

EnumControl

public abstract class EnumControl extends Control

Fields Summary
private Object[]
values
private Object
value
Constructors Summary
protected EnumControl(Type type, Object[] values, Object value)

        super(type);
        this.value = value;
        this.values = values;
    
Methods Summary
public java.lang.ObjectgetValue()

        return value;
    
public java.lang.Object[]getValues()

        return values;
    
public voidsetValue(java.lang.Object value)

        for (Object val : values) {
            if (val.equals(value)) {
                this.value = value;
                return;
            }
        }
        // sound.0D=The value is not supported
        throw new IllegalArgumentException(Messages.getString("sound.0D")); //$NON-NLS-1$
    
public java.lang.StringtoString()

        return getType() + " with current value: " + value; //$NON-NLS-1$