WebImage

public final class WebImage extends Object
implements Parcelable

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

Inherited Constant Summary

Field Summary

public static final Creator<WebImage> CREATOR

Public Constructor Summary

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 Method Summary

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
String
toString()
Returns a string representation of this object.
void
writeToParcel(Parcel out, int flags)

Inherited Method Summary

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 The URL of the image.
width The width of the image, in pixels.
height 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 The URL of the image.
Throws
IllegalArgumentException If the URL is null or empty.

Public Methods

public boolean equals (Object other)

public int getHeight ()

Gets the image height, in pixels.

public Uri getUrl ()

Gets the image URL.

public int getWidth ()

Gets the image width, in pixels.

public int hashCode ()

public String toString ()

Returns a string representation of this object.

public void writeToParcel (Parcel out, int flags)