org.silverpeas.media
Class Definition

java.lang.Object
  extended by org.silverpeas.media.Definition

public class Definition
extends Object

A container to handle resolution informations.


Field Summary
static Definition NULL
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

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 -

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2016 Silverpeas. All Rights Reserved.