| Modifier and Type | Field and Description |
|---|---|
static SizeD |
EMPTY
|
double |
height
Gets the height.
|
static SizeD |
INFINITE
|
double |
width
Gets the width.
|
static SizeD |
ZERO
|
| Constructor and Description |
|---|
SizeD() |
SizeD(double width,
double height)
Creates a new size using the provided width and height.
|
SizeD(ISize size)
|
| Modifier and Type | Method and Description |
|---|---|
static SizeD |
convertFrom(MutableSize size)
Performs an implicit conversion from
MutableSize to SizeD. |
static MutableSize |
convertToMutableSize(SizeD size)
Performs an explicit conversion from
SizeD to MutableSize. |
boolean |
equals(Object other) |
static boolean |
equals(SizeD size1,
SizeD size2)
Implements the operator ==.
|
double |
getArea()
|
double |
getHeight()
Gets the height.
|
double |
getWidth()
Gets or sets the width.
|
int |
hashCode() |
boolean |
isEmpty()
Gets a value indicating whether this instance is deemed empty.
|
boolean |
isFinite()
Gets a value indicating whether this instance is finite.
|
MutableSize |
toMutableSize()
Converts this instance to an
MutableSize instance. |
SizeD |
toSizeD()
|
String |
toString()
Returns a human readable string that contains information about the values of this instance.
|
public static final SizeD EMPTY
public final double height
Negative values for the height indicate an empty size.
public static final SizeD INFINITE
public final double width
Negative values for the width indicate an empty size.
public static final SizeD ZERO
public SizeD()
public SizeD(double width,
double height)
width - The new width.height - The new height.public SizeD(ISize size)
size - The size to get the initial values from.public static final SizeD convertFrom(MutableSize size)
MutableSize to SizeD.size - The size.public static final MutableSize convertToMutableSize(SizeD size)
SizeD to MutableSize.size - The size.public final double getArea()
public final double getHeight()
empty size.public final double getWidth()
empty size.public final boolean isEmpty()
public final boolean isFinite()
true if this instance is finite; false otherwise.public final MutableSize toMutableSize()
MutableSize instance.MutableSize instance, whose attributes have been initialized with the values of this instance.