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
.Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2008, 2017, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.