|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfacebook4j.internal.util.z_F4JInternalParseUtil
public final class z_F4JInternalParseUtil
A tiny parse utility class.
| Method Summary | |
|---|---|
static int |
computeTimeZoneOffsetInHours(TimeZone timeZone,
long currentDatetime)
Computes the offset in hours for a given timezone at a given date/time. |
static Boolean |
getBoolean(String name,
JSONObject json)
|
static Map<String,Boolean> |
getBooleanMap(String name,
JSONObject json)
|
static Double |
getDouble(String name,
JSONObject json)
|
static boolean |
getFlag(String name,
JSONObject json)
|
static Integer |
getInt(String str)
|
static Integer |
getInt(String name,
JSONObject json)
|
static Date |
getISO8601Datetime(String name,
JSONObject json)
|
static Long |
getLong(String str)
|
static Long |
getLong(String name,
JSONObject json)
|
static Map<String,Long> |
getLongMap(String name,
JSONObject json)
|
static int |
getPrimitiveInt(String str)
|
static int |
getPrimitiveInt(String name,
JSONObject json)
|
static long |
getPrimitiveLong(String str)
|
static long |
getPrimitiveLong(String name,
JSONObject json)
|
static String |
getRawString(String name,
JSONObject json)
|
static List<String> |
getStringList(String name,
JSONObject json)
|
static Map<String,String> |
getStringMap(String name,
JSONObject json)
|
static TimeZone |
getTimeZone(String name,
JSONObject json)
|
static Double |
getTimeZoneOffset(String name,
JSONObject json,
long datetimeReference)
Parses the value of a field as a timezone offset in hours. |
static URI |
getURI(String name,
JSONObject json)
|
static URL |
getURL(String name,
JSONObject json)
|
static boolean |
isJSONArray(String name,
JSONObject json)
|
static boolean |
isJSONObject(String name,
JSONObject json)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String getRawString(String name,
JSONObject json)
public static int getPrimitiveInt(String name,
JSONObject json)
public static int getPrimitiveInt(String str)
public static Integer getInt(String name,
JSONObject json)
public static Integer getInt(String str)
public static long getPrimitiveLong(String name,
JSONObject json)
public static long getPrimitiveLong(String str)
public static Long getLong(String name,
JSONObject json)
public static Long getLong(String str)
public static Double getDouble(String name,
JSONObject json)
public static Double getTimeZoneOffset(String name,
JSONObject json,
long datetimeReference)
name - the name of the member of the given json object that is
the raw string to be parsedjson - the json objectdatetimeReference - the date/time for which the offset is to be computed
public static int computeTimeZoneOffsetInHours(TimeZone timeZone,
long currentDatetime)
timeZone - the timezonecurrentDatetime - the date/time
public static Boolean getBoolean(String name,
JSONObject json)
public static boolean getFlag(String name,
JSONObject json)
public static Date getISO8601Datetime(String name,
JSONObject json)
throws FacebookException
FacebookException
public static URL getURL(String name,
JSONObject json)
public static URI getURI(String name,
JSONObject json)
public static TimeZone getTimeZone(String name,
JSONObject json)
public static Map<String,String> getStringMap(String name,
JSONObject json)
throws FacebookException
FacebookException
public static Map<String,Long> getLongMap(String name,
JSONObject json)
throws FacebookException
FacebookException
public static Map<String,Boolean> getBooleanMap(String name,
JSONObject json)
throws FacebookException
FacebookException
public static List<String> getStringList(String name,
JSONObject json)
throws FacebookException
FacebookException
public static boolean isJSONObject(String name,
JSONObject json)
public static boolean isJSONArray(String name,
JSONObject json)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||