Skip to content

Commit 4ac8b1d

Browse files
Javadocfix (#127)
* fix javadocs missing descriptions * fix silly misspellings.. * one more javadoc cleanup
1 parent 57b2168 commit 4ac8b1d

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

datafile-handler/src/main/java/com/optimizely/ab/android/datafile_handler/DatafileHandler.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ public interface DatafileHandler {
4545
/**
4646
* Start background updates to the project datafile .
4747
*
48-
* @param context application context for download
48+
* @param context application context for download
49+
* @param projectId project id for background updates.
4950
* @param updateInterval frequency of updates in seconds
5051
*/
5152
void startBackgroundUpdates(Context context, String projectId, Long updateInterval);
@@ -80,8 +81,8 @@ public interface DatafileHandler {
8081
* Has the file already been cached locally?
8182
*
8283
* @param context application context for datafile cache
83-
* @param projectId
84-
* @return
84+
* @param projectId projectId of the datafile
85+
* @return true if the datafile is cached or false if not.
8586
*/
8687
Boolean isDatafileSaved(Context context, String projectId);
8788

datafile-handler/src/main/java/com/optimizely/ab/android/datafile_handler/DatafileLoadedListener.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,17 @@
2929
public interface DatafileLoadedListener {
3030

3131
/**
32-
* Called with new datafile
32+
* Called with new datafile after a download.
3333
*
3434
* @param dataFile the datafile json, can be null if datafile loading failed.
3535
*
3636
*/
3737
void onDatafileLoaded(@Nullable String dataFile);
3838

3939
/**
40+
* The datafile download stopped for some reason.
4041
*
41-
* @param context
42+
* @param context application context
4243
*/
4344
void onStop(Context context);
4445
}

user-profile/src/main/java/com/optimizely/ab/android/user_profile/UserProfileCacheUtils.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ public class UserProfileCacheUtils {
3535
/**
3636
* Transform a user profile JSONObject to a user profile map.
3737
*
38-
* @param userProfilesJson
39-
* @return
38+
* @param userProfilesJson JSONObject representing the user profile from UserProfileService
39+
* @return map of user id key and experiments with variations the user has participated in.
40+
* @throws JSONException Exception if there is a json parsing problem
4041
*/
4142
public static Map<String, Map<String, Object>> convertJSONObjectToMap(JSONObject userProfilesJson) throws
4243
JSONException {
@@ -74,9 +75,9 @@ public static Map<String, Map<String, Object>> convertJSONObjectToMap(JSONObject
7475
/**
7576
* Transform a user profile map to a user profile JSONObject.
7677
*
77-
* @param userProfilesMap
78-
* @return
79-
* @throws Exception
78+
* @param userProfilesMap map with user id as key and experiments variation map from there.
79+
* @return JSONObject of the user profile service
80+
* @throws Exception if the json is malformed or the map is malformed, an exception can occur.
8081
*/
8182
public static JSONObject convertMapToJSONObject(Map<String, Map<String, Object>> userProfilesMap) throws Exception {
8283
JSONObject userProfilesJson = new JSONObject();

0 commit comments

Comments
 (0)