Interface Size


public interface Size
A pair of numbers that in general are used to define dimensions in the two-dimensional space.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Size
    Returns an empty Size with zero width and height.
    default int
    Returns the vertical dimension.
    default boolean
    Returns true if this size is empty.
    static Size
    of(int width, int height)
    Returns the Size instance for the given width and height values.
    default int
    Returns the horizontal dimension.
  • Method Details

    • empty

      static Size empty()
      Returns an empty Size with zero width and height.
    • of

      static Size of(int width, int height)
      Returns the Size instance for the given width and height values.
      Throws:
      IllegalArgumentException - when width or height is negative
    • width

      default int width()
      Returns the horizontal dimension.
    • height

      default int height()
      Returns the vertical dimension.
    • isEmpty

      default boolean isEmpty()
      Returns true if this size is empty.