/** * Retrieve a field as a {@code double}. It must be castable as such. * * @param index the index of the field * @return the {@code double} representation of the field */ public double getDouble(int index) { Object field = this.values[index]; return ReflectionUtils.toDouble(field); }
@Override public double getDoubleProperty(String propertyKey, double fallback) { try { return ReflectionUtils.toDouble(ReflectionUtils.getProperty(this.operator, propertyKey)); } catch (Exception e) { logger.error("Could not retrieve property \"{}\" from {}.", propertyKey, this.operator, e); return fallback; } }