twitter4j

## Class MediaEntityJSONImpl

- java.lang.Object
- - twitter4j.MediaEntityJSONImpl

All Implemented Interfaces:
  Serializable, Comparable<twitter4j.EntityIndex>, MediaEntity, TweetEntity, URLEntity

    public class MediaEntityJSONImpl
    extends Object
    implements MediaEntity

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

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `compareTo(twitter4j.EntityIndex that)`
`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.
`String` `getExpandedURL()` Returns the expanded URL if mentioned URL is shorten.
`String` `getExtAltText()`
`long` `getId()` Returns the id of the media.
`String` `getMediaURL()` Returns the media URL.
`String` `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` `getText()` Returns the URL mentioned in the tweet. This method implementation is to meet TweetEntity interface and the behavior is equivalent to `URLEntity.getURL()`
`String` `getType()` Returns the media type ("photo", "video", "animated_gif").
`String` `getURL()` Returns the URL mentioned in the tweet.
`int` `getVideoAspectRatioHeight()`
`int` `getVideoAspectRatioWidth()`
`long` `getVideoDurationMillis()`
`MediaEntity.Variant[]` `getVideoVariants()`
`int` `hashCode()`
`String` `toString()`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### Method Detail

#### getId

    public long getId()

Description copied from interface: `MediaEntity`
Returns the id of the media.

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

#### getMediaURL

    public String getMediaURL()

Description copied from interface: `MediaEntity`
Returns the media URL.

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

#### getMediaURLHttps

    public String getMediaURLHttps()

Description copied from interface: `MediaEntity`
Returns the media secure URL.

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

#### getText

    public String getText()

Description copied from interface: `URLEntity`
Returns the URL mentioned in the tweet.
This method implementation is to meet TweetEntity interface and the behavior is equivalent to `URLEntity.getURL()`

Specified by:
  `getText` in interface `TweetEntity`
Specified by:
  `getText` in interface `URLEntity`
Returns:
  the mentioned URL

#### getURL

    public String getURL()

Description copied from interface: `URLEntity`
Returns the URL mentioned in the tweet.

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

#### getDisplayURL

    public String getDisplayURL()

Description copied from interface: `URLEntity`
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 String getExpandedURL()

Description copied from interface: `URLEntity`
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()

Description copied from interface: `MediaEntity`
Returns the media type ("photo", "video", "animated_gif").

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

#### getStart

    public int getStart()

Description copied from interface: `URLEntity`
Returns the index of the start character of the URL mentioned in the tweet.

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

#### getEnd

    public int getEnd()

Description copied from interface: `URLEntity`
Returns the index of the end character of the URL mentioned in the tweet.

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

#### getVideoAspectRatioWidth

    public int getVideoAspectRatioWidth()

Specified by:
  `getVideoAspectRatioWidth` in interface `MediaEntity`

#### getVideoAspectRatioHeight

    public int getVideoAspectRatioHeight()

Specified by:
  `getVideoAspectRatioHeight` in interface `MediaEntity`

#### getVideoDurationMillis

    public long getVideoDurationMillis()

Specified by:
  `getVideoDurationMillis` in interface `MediaEntity`

#### getExtAltText

    public String getExtAltText()

Specified by:
  `getExtAltText` in interface `MediaEntity`

#### getVideoVariants

    public MediaEntity.Variant[] getVideoVariants()

Specified by:
  `getVideoVariants` in interface `MediaEntity`

#### 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`

#### compareTo

    public int compareTo(twitter4j.EntityIndex that)

Specified by:
  `compareTo` in interface `Comparable<twitter4j.EntityIndex>`