code: public static Boolean extractToBoolean(final DeviceAttribute deviceAttributeRead)
  	    throws DevFailed {
  	final Object value = AttributeHelper.extract(deviceAttributeRead);
  	int boolValue = 0;
  	Boolean argout = Boolean.FALSE;
  	;
  
  	if (value instanceof Short) {
  	    boolValue = ((Short) value).intValue();
  	} else if (value instanceof String) {
  	    try {
  		if (Boolean.getBoolean((String) value)) {
  		    boolValue = 1;
  		}
  	    } catch (final Exception e) {
  		Except.throw_exception("TANGO_WRONG_DATA_ERROR", "output type " + value
  			+ " is not a boolean",
  			"AttributeHelper.extractToBoolean(deviceAttributeWritten)");
  	    }
  	} else if (value instanceof Integer) {
  	    boolValue = ((Integer) value).intValue();
  	} else if (value instanceof Long) {
  	    boolValue = ((Long) value).intValue();
  	} else if (value instanceof Float) {
  	    boolValue = ((Float) value).intValue();
  	} else if (value instanceof Boolean) {
  	    if (((Boolean) value).booleanValue()) {
  		boolValue = 1;
  	    }
  	} else if (value instanceof Double) {
  	    boolValue = ((Double) value).intValue();
  	} else if (value instanceof DevState) {
  	    boolValue = ((DevState) value).value();
  	} else {
  	    Except.throw_exception("TANGO_WRONG_DATA_ERROR", "output type " + value.getClass()
  		    + " not supported",
  		    "AttributeHelper.extractToBoolean(Object value,deviceAttributeWritten)");
  	}
  
  	if (boolValue == 1) {
  	    argout = Boolean.TRUE;
  	}
  
  	return argout;
      }
docs: Extract data from DeviceAttribute to a Boolean.
  
  @param deviceAttributeRead
  the DeviceAttribute attribute to read
  @return Boolean the result in Boolean format
  @throws DevFailed