public class Resolution
extends java.lang.Object
Constructor and Description |
---|
Resolution(int width,
int height)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
@NotNull java.awt.Dimension |
asDimension()
Returns the resolution as a
Dimension instance. |
boolean |
equals(@Nullable java.lang.Object obj) |
boolean |
equalsDisplayMode(@NotNull java.awt.DisplayMode displayMode)
Returns whether this resolution matches a
DisplayMode 's
resolution. |
int |
getHeight()
Returns the height in pixels.
|
int |
getWidth()
Returns the width in pixels.
|
int |
hashCode() |
static @Nullable Resolution |
parse(@NotNull java.lang.String str)
Creates a new instance from string representation.
|
@NotNull java.lang.String |
toString() |
public Resolution(int width, int height)
width
- the width in pixelsheight
- the height in pixels@Nullable public static @Nullable Resolution parse(@NotNull @NotNull java.lang.String str)
toString()
.str
- the string representationResolution instance
, or null
if the string
representation is invalidpublic int getWidth()
public int getHeight()
public boolean equalsDisplayMode(@NotNull @NotNull java.awt.DisplayMode displayMode)
DisplayMode
's
resolution.displayMode
- the display modepublic boolean equals(@Nullable @Nullable java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
@NotNull public @NotNull java.lang.String toString()
toString
in class java.lang.Object
@NotNull public @NotNull java.awt.Dimension asDimension()
Dimension
instance.