Examples of CarusoException


Examples of ca.teamdave.caruso.CarusoException

public class DoubleSensor {
    private Sensor source;
    public DoubleSensor(Sensor source) throws CarusoException{
        this.source = source;
        if (this.source.getValueType() != Double.class) {
            throw new CarusoException("Attempting to make a DoubleSensor out of a non-double type sensor");
        }
    }
View Full Code Here

Examples of ca.teamdave.caruso.CarusoException

     * @throws CarusoException
     */
    public final Object getValue() throws CarusoException {
        Object val = this.retrieveValue();
        if (!this.type.isAssignableFrom(val.getClass())) {
            throw new CarusoException("Sensor Attempted to return type "
                    + val.getClass().toString()
                    + " instead of " + this.type.toString());
        }
        return val;
    }
View Full Code Here

Examples of ca.teamdave.caruso.CarusoException

    private Sensor source;

    public BooleanSensor(Sensor source) throws CarusoException {
        this.source = source;
        if (this.source.getValueType() != Boolean.class) {
            throw new CarusoException("Attempting to create BooleanSensor from non-boolean sensor");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.