Class Definition


  • public class Definition
    extends Object
    A container to handle resolution informations.
    • Method Detail

      • fromZero

        public static Definition fromZero()
        Gets an instance with width and height set to zero.
        Returns:
      • of

        public static Definition of​(int width,
                                    int height)
        Gets an instance initialized with given sizes.
        Parameters:
        width -
        height -
        Returns:
      • isDefined

        public boolean isDefined()
        Indicates if one one dimension is defined.
        Returns:
      • isWidthDefined

        public boolean isWidthDefined()
        Indicates if width is defined.
        Returns:
      • isHeightDefined

        public boolean isHeightDefined()
        Indicates if height is defined.
        Returns:
      • getWidth

        public int getWidth()
        Gets the width.
        Returns:
      • widthOf

        public Definition widthOf​(int width)
        Sets the width.
        Parameters:
        width -
      • getHeight

        public int getHeight()
        Gets the height.
        Returns:
      • heightOf

        public Definition heightOf​(int height)
        Sets the height.
        Parameters:
        height -
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object