|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.haphazard.util.Dimension3D
A class for describing volume in three dimensions
Field Summary | |
int |
height
The height dimension; negative values can be used. |
int |
length
The length dimension; negative values can be used. |
int |
width
The width dimension; negative values can be used. |
Constructor Summary | |
Dimension3D()
Creates a new instance of Dimension3D |
|
Dimension3D(int width,
int height,
int length)
Creates a new instance of Dimension3D |
Method Summary | |
boolean |
envelopes(Dimension3D dimension)
Checks if this dimension can completely envelope another dimension |
int |
getHeight()
Gets the height |
int |
getLength()
Gets the length |
int |
getWidth()
Gets the width |
int |
getVolume()
Gets the volume of this container, always positive |
void |
setSize(int width,
int height)
Sets the size in two dimensions |
void |
setSize(int width,
int height,
int length)
Sets the size of all dimensions |
java.lang.String |
toXML(int indent)
Transforms this object into an XML notation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public int height
public int width
public int length
Constructor Detail |
public Dimension3D()
public Dimension3D(int width, int height, int length)
width
- The widthheight
- The heightlength
- The lengthMethod Detail |
public int getHeight()
public int getWidth()
public int getLength()
public int getVolume()
public void setSize(int width, int height)
width
- The widthheight
- The heightpublic void setSize(int width, int height, int length)
width
- The widthheight
- The heightlength
- The lengthpublic boolean envelopes(Dimension3D dimension)
dimension
- The dimension to check against
public java.lang.String toXML(int indent)
indent
- The indent level
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |