Google Data APIs Client Library (1.41.1)



com.google.api.gbase.client
Class Thumbnail

java.lang.Object
  extended by com.google.api.gbase.client.Thumbnail

public final class Thumbnail
extends java.lang.Object

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.


Constructor Summary
Thumbnail()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getHeight()
          Returns the image height (pixels).
 java.lang.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(java.lang.String url)
          Sets the Url that should point to the thumbnail image.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Thumbnail

public Thumbnail()
Method Detail

getUrl

public java.lang.String getUrl()
Returns the Url pointing to the thumbnail image.


setUrl

public void setUrl(java.lang.String url)
Sets the Url that should point to the thumbnail image.


getWidth

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:
java.lang.IllegalStateException - if the thumbnail size information is not set

getHeight

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:
java.lang.IllegalStateException - if the thumbnail size information is not set

setSize

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

isSizeSpecified

public boolean isSizeSpecified()
Returns true if the size was explicitly set, false otherwise.


equals

public boolean equals(java.lang.Object obj)
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