code: @NonNull
      public static SharedPreferences.Editor putDouble(@NonNull SharedPreferences.Editor editor,
              @NonNull String key, double value) {
          editor.putLong(key, Double.doubleToLongBits(value));
          return editor;
      }
docs: Converts and stores double value as long.