Size

public class Size

Image size (width and height dimensions).

Constructors

Size

public Size(int w, int h)

Sets the dimensions for pictures.

Parameters:
  • w – the photo width (pixels)
  • h – the photo height (pixels)

Methods

equals

public boolean equals(Object obj)

Compares obj to this size.

Parameters:
  • obj – the object to compare this size with.
Returns:

true if the width and height of obj is the same as those of this size. false otherwise.

getHeight

public int getHeight()

getWidth

public int getWidth()

hashCode

public int hashCode()

toString

public String toString()