Class Size


  • public class Size
    extends Object
    The size.
    • Constructor Detail

      • Size

        public Size()
        Creates instance.
      • Size

        public Size​(long x,
                    long y)
        Creates instance.
        Parameters:
        x - the X-coordinate
        y - the Y-coordinate
      • Size

        public Size​(Size size)
        Creates instance.
        Parameters:
        size - , cannot be null
    • Method Detail

      • add

        public void add​(Size size)
        Adds size.
        Parameters:
        size - , cannot be null
      • isEquals

        public boolean isEquals​(Size size)
        Checks if the size is equals the given one.
        Parameters:
        size - , cannot be null
        Returns:
        true if the size is equals the given one
      • isGreater

        public boolean isGreater​(Size size)
        Checks if the size is greater than geven one.
        Parameters:
        size - , cannot be null
        Returns:
        true if the size is greater than geven one.
      • isEmpty

        public boolean isEmpty()
        Checks if the size is empty.
        Returns:
        true if the size is empty.
      • getCx

        public int getCx()
        Returns X-coordinate.
        Returns:
        X-coordinate.
      • setCx

        public void setCx​(int cx)
        Sets X-coordinate.
        Parameters:
        cx - - X-coordinate.
      • getCy

        public int getCy()
        returns Y-coordinate.
        Returns:
        Y-coordinate
      • setCy

        public void setCy​(int cy)
        Sets Y-coordinate.
        Parameters:
        cy - - Y-coordinate.