Package org.silverpeas.core.io.media
Class Definition
- java.lang.Object
-
- org.silverpeas.core.io.media.Definition
-
public class Definition extends Object
A container to handle resolution informations.
-
-
Field Summary
Fields Modifier and Type Field Description static Definition
NULL
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
static Definition
fromZero()
Gets an instance with width and height set to zero.int
getHeight()
Gets the height.int
getWidth()
Gets the width.int
hashCode()
Definition
heightOf(int height)
Sets the height.boolean
isDefined()
Indicates if one one dimension is defined.boolean
isHeightDefined()
Indicates if height is defined.boolean
isWidthDefined()
Indicates if width is defined.static Definition
of(int width, int height)
Gets an instance initialized with given sizes.Definition
widthOf(int width)
Sets the width.
-
-
-
Field Detail
-
NULL
public static final Definition NULL
-
-
Method Detail
-
fromZero
public static Definition fromZero()
Gets an instance with width and height set to zero.- Returns:
-
of
public static Definition of(int width, int height)
Gets an instance initialized with given sizes.- Parameters:
width
-height
-- Returns:
-
isDefined
public boolean isDefined()
Indicates if one one dimension is defined.- Returns:
-
isWidthDefined
public boolean isWidthDefined()
Indicates if width is defined.- Returns:
-
isHeightDefined
public boolean isHeightDefined()
Indicates if height is defined.- Returns:
-
getWidth
public int getWidth()
Gets the width.- Returns:
-
widthOf
public Definition widthOf(int width)
Sets the width.- Parameters:
width
-
-
getHeight
public int getHeight()
Gets the height.- Returns:
-
heightOf
public Definition heightOf(int height)
Sets the height.- Parameters:
height
-
-
-