Class Size
java.lang.Object
com.iizix.Size
- All Implemented Interfaces:
Serializable, Cloneable
A size with integers.
- Author:
- Christopher Mindus
- See Also:
Field Summary
FieldsConstructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionclone()Clones this instance.static intcompareWidthThenHeight(Size s1, Size s2) Compares to sizes by first the width, then the height.booleanCheck for equality.inthashCode()Hash code.toString()Creates the string representation of this position as className[width=NN,height=NN].
Field Details
width
public int widthThe width.height
public int heightThe height.
Constructor Details
Size
public Size()Constructs a size initialized to 0,0.Size
public Size(int width, int height) Constructs and initializes position.- Parameters:
width- The width.height- The height.
Size
Method Details
equals
clone
hashCode
toString
compareWidthThenHeight