nextapp.echo
Class Dimension

java.lang.Object
  extended by nextapp.echo.Dimension
All Implemented Interfaces:
java.io.Serializable

public class Dimension
extends java.lang.Object
implements java.io.Serializable

An immutable representation of a two-dimensional size (width and height).

See Also:
Serialized Form

Constructor Summary
Dimension(int width, int height)
          Creates a new dimension of the given width and height.
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns true if this coordinate is equivalent to the provided object.
 int getHeight()
          Returns the height of this dimension.
 int getWidth()
          Returns the width of this dimension.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dimension

public Dimension(int width,
                 int height)
Creates a new dimension of the given width and height.

Parameters:
width - The width of the dimension.
height - The height of the dimension.
Method Detail

equals

public boolean equals(java.lang.Object o)
Returns true if this coordinate is equivalent to the provided object.

Overrides:
equals in class java.lang.Object
Parameters:
o - The object to test this dimension for equality with.
Returns:
True if this dimension is equivalent to the provided object.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getHeight

public int getHeight()
Returns the height of this dimension.

Returns:
The height of this dimension.

getWidth

public int getWidth()
Returns the width of this dimension.

Returns:
The width of this dimension.