package com.sensirion.smartgadget.utils;

import android.content.Context;
import android.support.annotation.NonNull;
import android.util.TypedValue;


public abstract class XmlFloatExtractor {

    public static float getFloatValueFromId(@NonNull final Context context, final int resourceId) {
        final TypedValue outValue = new TypedValue();
        context.getResources().getValue(resourceId, outValue, true);
        return outValue.getFloat();
    }
}
@@ -67,16 +67,60 @@
 ontext;%0A
+import android.support.annotation.DimenRes;%0A
 import a
@@ -191,51 +191,350 @@
 e;%0A%0A
-%0A
 public 
-abstract class XmlFloatExtractor %7B%0A
+final class XmlFloatExtractor %7B%0A%0A    private XmlFloatExtractor()%7B%7D%0A%0A    /**%0A     * Extracts a dimension value from the XML resources into a float.%0A     * @param context needed to access the XML resources.%0A     * @param resourceId that will be extracted into a float.%0A     * @return %7B@link float%7D with the extracted float value.%0A     */
 %0A   
@@ -605,16 +605,70 @@
 context,
+%0A                                            @DimenRes
  final i
@@ -709,20 +709,17 @@
 edValue 
-outV
+v
 alue = n
@@ -787,20 +787,17 @@
 urceId, 
-outV
+v
 alue, tr
@@ -820,12 +820,9 @@
 urn 
-outV
+v
 alue

Refactor XmlFloatExtractor.java