public final class

WebImage

extends Object
implements Parcelable
java.lang.Object
   ↳ com.google.android.gms.common.images.WebImage

Class Overview

A class that represents an image that is located on a web server.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<WebImage> CREATOR
Public Constructors
WebImage(Uri url, int width, int height)
Constructs a new WebImage with the given URL and dimensions.
WebImage(Uri url)
Constructs a new WebImage with the given URL.
Public Methods
boolean equals(Object other)
int getHeight()
Gets the image height, in pixels.
Uri getUrl()
Gets the image URL.
int getWidth()
Gets the image width, in pixels.
int hashCode()
String toString()
Returns a string representation of this object.
void writeToParcel(Parcel out, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<WebImage> CREATOR

Public Constructors

public WebImage (Uri url, int width, int height)

Constructs a new WebImage with the given URL and dimensions.

Parameters
url Uri: The URL of the image.
width int: The width of the image, in pixels.
height int: The height of the image, in pixels.
Throws
IllegalArgumentException If the URL is null or empty, or the dimensions are invalid.

public WebImage (Uri url)

Constructs a new WebImage with the given URL.

Parameters
url Uri: The URL of the image.
Throws
IllegalArgumentException If the URL is null or empty.

Public Methods

public boolean equals (Object other)

Parameters
other Object
Returns
boolean

public int getHeight ()

Gets the image height, in pixels.

Returns
int

public Uri getUrl ()

Gets the image URL.

Returns
Uri

public int getWidth ()

Gets the image width, in pixels.

Returns
int

public int hashCode ()

Returns
int

public String toString ()

Returns a string representation of this object.

Returns
String

public void writeToParcel (Parcel out, int flags)

Parameters
out Parcel
flags int