public final class

Thumbnail

extends Object
java.lang.Object
   ↳ com.google.api.gbase.client.Thumbnail

Class Overview

Class representing parsed information for one thumbnail: the size (in pixels) and the Url for accessing the image. This class is mutable through its setUrl(String) and setSize(int, int) methods.

Summary

Fields
private Integer height Thumbnail height, expressed in pixels.
private String url Url pointing to the thumbnail.
private Integer width Thumbnail width, expressed in pixels.
Public Constructors
Thumbnail()
Public Methods
boolean equals(Object obj)
int getHeight()
Returns the image height (pixels).
String getUrl()
Returns the Url pointing to the thumbnail image.
int getWidth()
Returns the image width (pixels).
int hashCode()
boolean isSizeSpecified()
Returns true if the size was explicitly set, false otherwise.
void setSize(int width, int height)
Sets the thumbnail size.
void setUrl(String url)
Sets the Url that should point to the thumbnail image.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private Integer height

Thumbnail height, expressed in pixels. Null if not set.

private String url

Url pointing to the thumbnail.

private Integer width

Thumbnail width, expressed in pixels. Null if not set.

Public Constructors

public Thumbnail ()

Public Methods

public boolean equals (Object obj)

Parameters
obj

public int getHeight ()

Returns the image height (pixels). Use isSizeSpecified() to check if this object contains valid size information.

Returns
  • the height of the thumbnail, expressed in pixels
Throws
IllegalStateException if the thumbnail size information is not set

public String getUrl ()

Returns the Url pointing to the thumbnail image.

public int getWidth ()

Returns the image width (pixels). Use isSizeSpecified() to check if this object contains valid size information.

Returns
  • the width of the thumbnail, expressed in pixels
Throws
IllegalStateException if the thumbnail size information is not set

public int hashCode ()

public boolean isSizeSpecified ()

Returns true if the size was explicitly set, false otherwise.

public void setSize (int width, int height)

Sets the thumbnail size.

Parameters
width The width of the thumbnail, expressed in pixels
height The height of the thumbnail, expressed in pixels

public void setUrl (String url)

Sets the Url that should point to the thumbnail image.

Parameters
url

public String toString ()