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