class ContinuousResource implements Resource {

    @Override
    public <T> Optional<T> valueAs(Class<T> type) {
        checkNotNull(type);

        if (type == Object.class || type == double.class || type == Double.class) {
            @SuppressWarnings("unchecked")
            T value = (T) Double.valueOf(this.value);
            return Optional.of(value);
        }

        return Optional.empty();
    }

      ContinuousResource(ContinuousResourceId id, double value);
      ContinuousResource();

}