// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3) space 
// Source File Name:   DoubleChecker.java

package lt.ktu.gmj.propertySheet;


// Referenced classes of package lt.ktu.gmj.propertySheet:
//            SimplePropertyProvider, PropertyReader, InvalidPropertyException, PropertyWriter, 
//            PropertyProvider

public class DoubleChecker extends SimplePropertyProvider
{

    public Object get()
    {
        return provider.get();
    }

    public void set(Object obj)
        throws InvalidPropertyException
    {
        double d = ((Double)obj).doubleValue();
        if (d < min || d > max)
        {
            throw new InvalidPropertyException("Out of bounds");
        } else
        {
            provider.set(obj);
            return;
        }
    }

    public DoubleChecker(PropertyProvider propertyprovider, double d, double d1)
    {
        provider = propertyprovider;
        min = d;
        max = d1;
    }

    private PropertyProvider provider;
    private double min;
    private double max;
}
