WebImage

public final class WebImage 
implements Parcelable 

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

Summary

Constants

static final Parcelable.Creator < WebImage >

Public fields

final int
final Uri
url
final int

Public constructors

WebImage ( Uri  url)

Constructs a new WebImage with the given URL.

WebImage ( Uri  url, int width, int height)

Constructs a new WebImage with the given URL and dimensions.

Public methods

boolean
equals (@ Nullable Object  other)
int

Gets the image height, in pixels.

Uri
getUrl ()

Gets the image URL.

int

Gets the image width, in pixels.

int
String

Returns a string representation of this object.

void
writeToParcel ( Parcel  out, int flags)

Inherited Constants

From android.os.Parcelable
static final int
static final int

Inherited methods

Constants

CREATOR

public static final  Parcelable.Creator 
< WebImage 
 CREATOR 

Public fields

height

public final int  height 

url

public final  Uri 
 url 

width

public final int  width 

Public constructors

WebImage

public  WebImage 
( Uri 
 url)

Constructs a new WebImage with the given URL.

Parameters
Uri  url

The URL of the image.

Throws
java.lang.IllegalArgumentException

If the URL is null or empty.

WebImage

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

Constructs a new WebImage with the given URL and dimensions.

Parameters
Uri  url

The URL of the image.

int width

The width of the image, in pixels.

int height

The height of the image, in pixels.

Throws
java.lang.IllegalArgumentException

If the URL is null or empty, or the dimensions are invalid.

Public methods

equals

public boolean  equals 
(@ Nullable 
 Object 
 other)

getHeight

public int  getHeight 
()

Gets the image height, in pixels.

getUrl

public  Uri 
 getUrl 
()

Gets the image URL.

getWidth

public int  getWidth 
()

Gets the image width, in pixels.

hashCode

public int  hashCode 
()

toString

public  String 
 toString 
()

Returns a string representation of this object.

writeToParcel

public void  writeToParcel 
( Parcel 
 out, int flags)
Create a Mobile Website
View Site in Mobile | Classic
Share by: