All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.testfabrik.webmate.javasdk.commonutils.Dimension Maven / Gradle / Ivy

There is a newer version: 0.56
Show newest version
package com.testfabrik.webmate.javasdk.commonutils;

/**
 * Wrapper class to describe screen and viewport resolutions.
 */

public class Dimension {

    private int width;
    private int height;

    /**
     * Creates a new Dimension Object.
     * @param width The width of the screen/viewport.
     * @param height The height of the screen/viewport,.
     */
    public Dimension(int width, int height) {
        this.width = width;
        this.height= height;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Dimension dimension = (Dimension) o;

        if (width != dimension.width) return false;
        return height == dimension.height;
    }

    @Override
    public int hashCode() {
        int result = width;
        result = 31 * result + height;
        return result;
    }

    public int getWidth() {

        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy