twitter4j.json
Class JSONObjectType

java.lang.Object
  extended by twitter4j.json.JSONObjectType
All Implemented Interfaces:
java.io.Serializable

public final class JSONObjectType
extends java.lang.Object
implements java.io.Serializable

Since:
Twitter4J 2.1.9
Author:
Dan Checkoway - dcheckoway at gmail.com
See Also:
Serialized Form

Field Summary
static JSONObjectType BLOCK
           
static JSONObjectType DELETE
           
static JSONObjectType DIRECT_MESSAGE
           
static JSONObjectType FAVORITE
           
static JSONObjectType FOLLOW
           
static JSONObjectType FRIENDS
           
static JSONObjectType LIMIT
           
private static twitter4j.internal.logging.Logger logger
           
private  java.lang.String name
           
static JSONObjectType RETWEET
           
static JSONObjectType SCRUB_GEO
           
static JSONObjectType SENDER
           
private static long serialVersionUID
           
static JSONObjectType STATUS
           
static JSONObjectType UNBLOCK
           
static JSONObjectType UNFAVORITE
           
static JSONObjectType UNFOLLOW
           
static JSONObjectType USER_LIST_CREATED
           
static JSONObjectType USER_LIST_DESTROYED
           
static JSONObjectType USER_LIST_MEMBER_ADDED
           
static JSONObjectType USER_LIST_MEMBER_DELETED
           
static JSONObjectType USER_LIST_SUBSCRIBED
           
static JSONObjectType USER_LIST_UNSUBSCRIBED
           
static JSONObjectType USER_LIST_UPDATED
           
static JSONObjectType USER_UPDATE
           
 
Constructor Summary
private JSONObjectType()
           
private JSONObjectType(java.lang.String name)
           
 
Method Summary
static JSONObjectType determine(twitter4j.internal.org.json.JSONObject json)
          Determine the respective object type for a given JSONObject.
 boolean equals(java.lang.Object o)
           
 java.lang.String getName()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

private static final twitter4j.internal.logging.Logger logger

SENDER

public static final JSONObjectType SENDER

STATUS

public static final JSONObjectType STATUS

DIRECT_MESSAGE

public static final JSONObjectType DIRECT_MESSAGE

DELETE

public static final JSONObjectType DELETE

LIMIT

public static final JSONObjectType LIMIT

SCRUB_GEO

public static final JSONObjectType SCRUB_GEO

FRIENDS

public static final JSONObjectType FRIENDS

FAVORITE

public static final JSONObjectType FAVORITE

UNFAVORITE

public static final JSONObjectType UNFAVORITE

RETWEET

public static final JSONObjectType RETWEET

FOLLOW

public static final JSONObjectType FOLLOW

UNFOLLOW

public static final JSONObjectType UNFOLLOW

USER_LIST_MEMBER_ADDED

public static final JSONObjectType USER_LIST_MEMBER_ADDED

USER_LIST_MEMBER_DELETED

public static final JSONObjectType USER_LIST_MEMBER_DELETED

USER_LIST_SUBSCRIBED

public static final JSONObjectType USER_LIST_SUBSCRIBED

USER_LIST_UNSUBSCRIBED

public static final JSONObjectType USER_LIST_UNSUBSCRIBED

USER_LIST_CREATED

public static final JSONObjectType USER_LIST_CREATED

USER_LIST_UPDATED

public static final JSONObjectType USER_LIST_UPDATED

USER_LIST_DESTROYED

public static final JSONObjectType USER_LIST_DESTROYED

USER_UPDATE

public static final JSONObjectType USER_UPDATE

BLOCK

public static final JSONObjectType BLOCK

UNBLOCK

public static final JSONObjectType UNBLOCK

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

name

private final java.lang.String name
Constructor Detail

JSONObjectType

private JSONObjectType()

JSONObjectType

private JSONObjectType(java.lang.String name)
Method Detail

getName

public java.lang.String getName()

determine

public static JSONObjectType determine(twitter4j.internal.org.json.JSONObject json)
Determine the respective object type for a given JSONObject. This method inspects the object to figure out what type of object it represents. This is useful when processing JSON events of mixed type from a stream, in which case you may need to know what type of object to construct, or how to handle the event properly.

Parameters:
json - the JSONObject whose type should be determined
Returns:
the determined JSONObjectType, or null if not recognized

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object