public class Dimension2D extends Object
Constructor and Description |
---|
Dimension2D(double width,
double height)
Constructs a
Dimension2D with the specified width and
height. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
double |
getHeight()
The height of the dimension.
|
double |
getWidth()
The width of the dimension.
|
int |
hashCode()
Returns a hash code value for the Dimension2D object.
|
String |
toString()
Returns a string representation of this
Dimension2D . |
public Dimension2D(double width, double height)
Dimension2D
with the specified width and
height.width
- the widthheight
- the heightpublic final double getWidth()
public final double getHeight()
public boolean equals(Object obj)
public int hashCode()
public String toString()
Dimension2D
.
This method is intended to be used only for informational purposes.
The content and format of the returned string might vary between
implementations.
The returned string might be empty but cannot be null
.Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.