org.geotoolkit.display.shape
Class DoubleDimension2D

Object
  extended by Dimension2D
      extended by DoubleDimension2D
All Implemented Interfaces:
Serializable, Cloneable

public class DoubleDimension2D
extends Dimension2D
implements Serializable

Implements Dimension2D using double-precision floating point values.

Since:
1.0
Version:
3.00
Author:
Martin Desruisseaux (MPO, IRD)
See Also:
Serialized Form
Module:
referencing/geotk-referencing (download)    View source code for this class

Field Summary
 double height
          The height.
 double width
          The width.
 
Constructor Summary
DoubleDimension2D()
          Constructs a new dimension initialized to (0,0).
DoubleDimension2D(Dimension2D dimension)
          Constructs a new dimension initialized to the given dimension.
DoubleDimension2D(double w, double h)
          Constructs a new dimension with the specified values.
 
Method Summary
 boolean equals(Object object)
          Compares this dimension with the given object for equality.
 double getHeight()
          Returns the height.
 double getWidth()
          Returns the width.
 int hashCode()
          Returns a hash code value for this dimension.
 void setSize(double w, double h)
          Sets width and height for this dimension.
 String toString()
          Returns a string representation of this dimension.
 
Methods inherited from class Dimension2D
clone, setSize
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

width

public double width
The width.


height

public double height
The height.

Constructor Detail

DoubleDimension2D

public DoubleDimension2D()
Constructs a new dimension initialized to (0,0).


DoubleDimension2D

public DoubleDimension2D(Dimension2D dimension)
Constructs a new dimension initialized to the given dimension.

Parameters:
dimension - The dimension to copy.

DoubleDimension2D

public DoubleDimension2D(double w,
                         double h)
Constructs a new dimension with the specified values.

Parameters:
w - The width.
h - The height.
Method Detail

setSize

public void setSize(double w,
                    double h)
Sets width and height for this dimension.

Specified by:
setSize in class Dimension2D
Parameters:
w - The width.
h - The height.

getWidth

public double getWidth()
Returns the width.

Specified by:
getWidth in class Dimension2D

getHeight

public double getHeight()
Returns the height.

Specified by:
getHeight in class Dimension2D

hashCode

public int hashCode()
Returns a hash code value for this dimension.

Overrides:
hashCode in class Object

equals

public boolean equals(Object object)
Compares this dimension with the given object for equality.

Overrides:
equals in class Object
Parameters:
object - The object to compare with.
Returns:
true if this dimension is equal to the given object.

toString

public String toString()
Returns a string representation of this dimension.

Overrides:
toString in class Object


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.