Get a property as a float or throw an exception.

@param key the property name
766720
@Override
    public final float getFloat(final String key) {
        Float result = optFloat(key);
        if (result == null) {
            throw new ObjectMissingException(this, key);
        }
        return result;
    }
1305215
@Override
    public final Float optFloat(final String key, final Float defaultValue) {
        Float result = optFloat(key);
        return result == null ? defaultValue : result;
    }
71763
@Override
    public Object getValue(@NonNull String key) {
        if (key == null) { throw new IllegalArgumentException("key cannot be null."); }

        final int index = indexForColumnName(key);
        return index >= 0 ? getValue(index) : null;
    }
1321396
public function getFloatValue($key)
    {
        $value = $this->get($key);
        if ($value === null) {
            return null;
        }
        return (float)$value;
    }
887956
String getProperty(String key) {
        String value = properties.get(key);
        if (value == null) {
            throw new RuntimeException("No property value found for key " + key);
        }
        return value;
    }
808351
public float getNumber(int key, float default_) {
    Object o = get(key);
    return o instanceof Number ? ((Number)o).floatValue() : default_;
  }
82121
def get_float(self, key, optional=False):
        
        return self._get_typed_value(key, float, lambda x: float(x), optional)
745799
@Override
    public Integer getInteger(final String key) {
        return retrieve(new Callable<Integer>() {
            @Override
            public Integer call() throws Exception {
                return configuration.getInt(key);
            }
        }, null);
    }
1064789
@Trivial
    protected String getRawProperty(String key) {
        String rawValue = source.getValue(key);
        if (rawValue != null) {
            current.put(key, rawValue);
        }
        return rawValue;
    }
13134
public Float getAsNullableFloat(String key) {
		Object value = getAsObject(key);
		return FloatConverter.toNullableFloat(value);
	}
716566
public double getDouble(final String key) {
		final String value = getProperty(key);
		if (value == null) {
			throw new NumberFormatException("Couldn't parse property to double.");
		}
		return Double.parseDouble(value);
	}
315648
public int getInt(final String key) {
		final String value = getProperty(key);
		if (value == null) {
			throw new NumberFormatException("Couldn't parse property to int.");
		}
		return Integer.parseInt(value);
	}
765521
def get_as_nullable_float(self, key):
        
        value = self.get(key)
        return FloatConverter.to_nullable_float(value)
689954
public Float getAsFloat(String property) {
		if (super.has(property)) {
			return get(property).getAsFloat();
		}
		return null;
	}
1197835
public long getPropertyAsLong(Key key) {
        try {
            return Long.parseLong(getProperty(key));
        } catch (NumberFormatException e) {
            LOGGER.error("Error parsing number from property: " + key.getPropertyName());
            return -1;
        }
    }
1252943
public <W> W getValue(Class<W> clazz, String key) {
        if (values.get(key) == null) {
            return null;
        } else {
            try {
                return (W) values.get(key);
            } catch (ClassCastException e) {
                if (Number.class.isAssignableFrom(clazz)) {
                    try {
                        return (W) Utils.castNumberType(values.get(key), clazz);
                    } catch (ClassCastException e1) {
                        return null;
                    }
                } else {
                    throw e;
                }

            }

        }
    }
808373
public void bind(FloatProperty property, String key) {
		if (prefs.get(validateKey(key), null) != null) {
			property.set(prefs.getFloat(key, Float.NaN));
		}
		property.addListener(o -> prefs.putFloat(key, property.getValue()));
	}