public class Resolution
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Represents the screen resolution of a device in height and width, expressed in pixels.
Modifier and Type | Field and Description |
---|---|
private java.lang.Integer |
height
The screen resolution's height, expressed in pixels.
|
private java.lang.Integer |
width
The screen resolution's width, expressed in pixels.
|
Constructor and Description |
---|
Resolution() |
Modifier and Type | Method and Description |
---|---|
Resolution |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.Integer |
getHeight()
The screen resolution's height, expressed in pixels.
|
java.lang.Integer |
getWidth()
The screen resolution's width, expressed in pixels.
|
int |
hashCode() |
void |
setHeight(java.lang.Integer height)
The screen resolution's height, expressed in pixels.
|
void |
setWidth(java.lang.Integer width)
The screen resolution's width, expressed in pixels.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Resolution |
withHeight(java.lang.Integer height)
The screen resolution's height, expressed in pixels.
|
Resolution |
withWidth(java.lang.Integer width)
The screen resolution's width, expressed in pixels.
|
private java.lang.Integer width
The screen resolution's width, expressed in pixels.
private java.lang.Integer height
The screen resolution's height, expressed in pixels.
public void setWidth(java.lang.Integer width)
The screen resolution's width, expressed in pixels.
width
- The screen resolution's width, expressed in pixels.public java.lang.Integer getWidth()
The screen resolution's width, expressed in pixels.
public Resolution withWidth(java.lang.Integer width)
The screen resolution's width, expressed in pixels.
width
- The screen resolution's width, expressed in pixels.public void setHeight(java.lang.Integer height)
The screen resolution's height, expressed in pixels.
height
- The screen resolution's height, expressed in pixels.public java.lang.Integer getHeight()
The screen resolution's height, expressed in pixels.
public Resolution withHeight(java.lang.Integer height)
The screen resolution's height, expressed in pixels.
height
- The screen resolution's height, expressed in pixels.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Resolution clone()
clone
in class java.lang.Object