public class Size2D extends Object implements Cloneable, PublicCloneable, Serializable
Dimension2D
, but this class is broken on various
JDK releases (particularly JDK 1.3.1, refer to bugs 4189446 and 4976448 on
the Java bug parade).Modifier and Type | Field and Description |
---|---|
double |
height
The height.
|
double |
width
The width.
|
Constructor and Description |
---|
Size2D()
Creates a new instance with zero width and height.
|
Size2D(double width,
double height)
Creates a new instance with the specified width and height.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns a clone of this object.
|
boolean |
equals(Object obj)
Compares this instance for equality with an arbitrary object.
|
double |
getHeight()
Returns the height.
|
double |
getWidth()
Returns the width.
|
void |
setHeight(double height)
Sets the height.
|
void |
setWidth(double width)
Sets the width.
|
String |
toString()
Returns a string representation of this instance, mostly used for
debugging purposes.
|
public Size2D()
public Size2D(double width, double height)
width
- the width.height
- the height.public double getWidth()
public void setWidth(double width)
width
- the width.public double getHeight()
public void setHeight(double height)
height
- the height.public String toString()
public boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
clone
in interface PublicCloneable
clone
in class Object
CloneNotSupportedException
- if the object cannot be cloned.Copyright © 2001–2017 JFree.org. All rights reserved.