Class AbsoluteSize
- java.lang.Object
-
- net.coobird.thumbnailator.geometry.AbsoluteSize
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.DimensionsizeThe size of the object.
-
Constructor Summary
Constructors Constructor Description AbsoluteSize(int width, int height)Instantiates an object which indicates size of an object.AbsoluteSize(java.awt.Dimension size)Instantiates an object which indicates size of an object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Dimensioncalculate(int width, int height)Calculates the size of the object.java.lang.StringtoString()Returns aStringrepresentation of this object.
-
-
-
Constructor Detail
-
AbsoluteSize
public AbsoluteSize(java.awt.Dimension size)
Instantiates an object which indicates size of an object.- Parameters:
size- Size of the enclosed object.- Throws:
java.lang.NullPointerException- If the size isnull.
-
AbsoluteSize
public AbsoluteSize(int width, int height)Instantiates an object which indicates size of an object.- Parameters:
width- Width of the enclosed object.height- Height of the enclosed object.- Throws:
java.lang.IllegalArgumentException- If the width and/or height is less than or equal to0.
-
-
Method Detail
-
calculate
public java.awt.Dimension calculate(int width, int height)Description copied from interface:SizeCalculates the size of the object.
-
toString
public java.lang.String toString()
Returns aStringrepresentation of this object.- Overrides:
toStringin classjava.lang.Object- Returns:
Stringrepresentation of this object.
-
-