twitter4j.internal.json
Class MediaEntityJSONImpl

java.lang.Object
  extended by twitter4j.internal.json.MediaEntityJSONImpl
All Implemented Interfaces:
Serializable, MediaEntity, URLEntity

public class MediaEntityJSONImpl
extends Object
implements MediaEntity

Since:
Twitter4J 2.2.3
Author:
Yusuke Yamamoto - yusuke at mac.com
See Also:
Serialized Form

Constructor Summary
MediaEntityJSONImpl(JSONObject json)
           
 
Method Summary
 boolean equals(Object o)
           
 String getDisplayURL()
          Returns the display URL if mentioned URL is shorten.
 int getEnd()
          Returns the index of the end character of the URL mentioned in the tweet.
 URL getExpandedURL()
          Returns the expanded URL if mentioned URL is shorten.
 long getId()
          Returns the id of the media.
 URL getMediaURL()
          Returns the media URL.
 URL getMediaURLHttps()
          Returns the media secure URL.
 Map<Integer,MediaEntity.Size> getSizes()
          Returns size variations of the media.
 int getStart()
          Returns the index of the start character of the URL mentioned in the tweet.
 String getType()
          Returns the media type ("photo").
 URL getURL()
          Returns the URL mentioned in the tweet.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MediaEntityJSONImpl

public MediaEntityJSONImpl(JSONObject json)
                    throws TwitterException
Throws:
TwitterException
Method Detail

getId

public long getId()
Returns the id of the media.

Specified by:
getId in interface MediaEntity
Returns:
the id of the media

getMediaURL

public URL getMediaURL()
Returns the media URL.

Specified by:
getMediaURL in interface MediaEntity
Returns:
the media URL

getMediaURLHttps

public URL getMediaURLHttps()
Returns the media secure URL.

Specified by:
getMediaURLHttps in interface MediaEntity
Returns:
the media secure URL

getURL

public URL getURL()
Returns the URL mentioned in the tweet.

Specified by:
getURL in interface URLEntity
Returns:
the mentioned URL

getDisplayURL

public String getDisplayURL()
Returns the display URL if mentioned URL is shorten.

Specified by:
getDisplayURL in interface URLEntity
Returns:
the display URL if mentioned URL is shorten, or null if no shorten URL was mentioned.

getExpandedURL

public URL getExpandedURL()
Returns the expanded URL if mentioned URL is shorten.

Specified by:
getExpandedURL in interface URLEntity
Returns:
the expanded URL if mentioned URL is shorten, or null if no shorten URL was mentioned.

getSizes

public Map<Integer,MediaEntity.Size> getSizes()
Description copied from interface: MediaEntity
Returns size variations of the media.

Specified by:
getSizes in interface MediaEntity
Returns:
size variations of the media

getType

public String getType()
Returns the media type ("photo").

Specified by:
getType in interface MediaEntity
Returns:
the media type ("photo").

getStart

public int getStart()
Returns the index of the start character of the URL mentioned in the tweet.

Specified by:
getStart in interface URLEntity
Returns:
the index of the start character of the URL mentioned in the tweet

getEnd

public int getEnd()
Returns the index of the end character of the URL mentioned in the tweet.

Specified by:
getEnd in interface URLEntity
Returns:
the index of the end character of the URL mentioned in the tweet

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.