public final class MutableSize extends Object implements IMutableSize, ICloneable, Cloneable
This implementation stores the values of the width and height in double precision floating point members.
ISize| Constructor and Description |
|---|
MutableSize()
|
MutableSize(double width,
double height)
Creates an instance using the given width and height.
|
MutableSize(ISize size)
Creates an instance using the values provided by the size instance.
|
| Modifier and Type | Method and Description |
|---|---|
MutableSize |
clone()
Returns a memberwise clone of this instance.
|
boolean |
equals(ISize other) |
boolean |
equals(Object other)
Implements the equals method by comparing the given object's values.
|
double |
getHeight()
Gets the height.
|
double |
getWidth()
Gets the width.
|
int |
hashCode()
|
void |
setHeight(double value)
Sets the height.
|
void |
setWidth(double value)
Sets the width.
|
finalize, getClass, notify, notifyAll, toString, wait, wait, waitresize, resize, resizepublic MutableSize()
public MutableSize(double width,
double height)
width - The width.height - The heightpublic MutableSize(ISize size)
This will not create a dynamic instance. The values will be copied from size immediately and no reference is
held to that instance thereafter.
size - A size to retrieve the initial values from.public final MutableSize clone()
clone in interface ICloneableclone in class ObjectObject.clone()public final boolean equals(ISize other)
public boolean equals(Object other)
Note that SizeD cannot be equal. Only instances of this type and the ones returned by
the factory methods of this type can be equal to each other.
public final double getHeight()
getHeight in interface IMutableSizegetHeight in interface ISizesetHeight(double)public final double getWidth()
getWidth in interface IMutableSizegetWidth in interface ISizesetWidth(double)public int hashCode()
public final void setHeight(double value)
setHeight in interface IMutableSizevalue - The Height to set.getHeight()public final void setWidth(double value)
setWidth in interface IMutableSizevalue - The Width to set.getWidth()