|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutilities.Vector
public class Vector
A class that represents a two-dimensional vector. A vector contains two scalars, one contianing an X component and another with a Y component.
| Constructor Summary | |
|---|---|
Vector(java.lang.Integer dx,
java.lang.Integer dy)
Creates a new instance of Vector with the given change in X and Y |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
java.lang.Integer |
getDx()
Gets the Integer representing the change in the X direction of this vector |
java.lang.Integer |
getDy()
Gets the Integer representing the change in the Y direction of this vector |
void |
setDx(java.lang.Integer dx)
Sets the change in the X direction of this Vector |
void |
setDy(java.lang.Integer dy)
Sets the change in the Y direction of this Vector |
java.lang.String |
toString()
Returns a String representation of this Vector object |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Vector(java.lang.Integer dx,
java.lang.Integer dy)
dx - The difference in the X directiondy - The difference in the Y direction| Method Detail |
|---|
public java.lang.Integer getDx()
public java.lang.Integer getDy()
public void setDx(java.lang.Integer dx)
dx - The new difference in the X directionpublic void setDy(java.lang.Integer dy)
dy - The new difference in the Y directionpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public boolean equals(java.lang.Object o)
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||