com.fitbit.api.common.model.foods
Class Food

java.lang.Object
  extended by com.fitbit.api.common.model.foods.Food

public class Food
extends Object

User: gkutlu Date: Mar 4, 2010 Time: 2:53:29 PM


Constructor Summary
Food(org.json.JSONObject json)
           
Food(long foodId, String name, String brand, String accessLevel, int calories, double defaultServingSize, FoodUnit defaultUnit, int[] units)
           
 
Method Summary
static List<Food> constructFoodList(Response res)
           
static List<Food> constructFoodList(Response res, String arrayName)
           
static List<Food> constructFoodListFromArrayResponse(Response res)
           
 String getAccessLevel()
           
 String getBrand()
           
 int getCalories()
           
 double getDefaultServingSize()
           
 FoodUnit getDefaultUnit()
           
 long getFoodId()
           
 String getName()
           
 NutritionalValuesEntry getNutritionalValues()
           
 List<Serving> getServings()
           
 int[] getUnits()
           
 void setNutritionalValues(NutritionalValuesEntry nutritionalValues)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Food

public Food(long foodId,
            String name,
            String brand,
            String accessLevel,
            int calories,
            double defaultServingSize,
            FoodUnit defaultUnit,
            int[] units)

Food

public Food(org.json.JSONObject json)
     throws org.json.JSONException
Throws:
org.json.JSONException
Method Detail

constructFoodList

public static List<Food> constructFoodList(Response res)
                                    throws FitbitAPIException
Throws:
FitbitAPIException

constructFoodList

public static List<Food> constructFoodList(Response res,
                                           String arrayName)
                                    throws FitbitAPIException
Throws:
FitbitAPIException

constructFoodListFromArrayResponse

public static List<Food> constructFoodListFromArrayResponse(Response res)
                                                     throws FitbitAPIException
Throws:
FitbitAPIException

getFoodId

public final long getFoodId()

getName

public final String getName()

getBrand

public final String getBrand()

getUnits

public final int[] getUnits()

getAccessLevel

public String getAccessLevel()

getCalories

public int getCalories()

getDefaultServingSize

public double getDefaultServingSize()

getDefaultUnit

public FoodUnit getDefaultUnit()

getServings

public List<Serving> getServings()

getNutritionalValues

public NutritionalValuesEntry getNutritionalValues()

setNutritionalValues

public void setNutritionalValues(NutritionalValuesEntry nutritionalValues)


Copyright © 2012. All Rights Reserved.