|
||||||||||
| 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(Integer dx,
Integer dy)
Creates a new instance of Vector with the given change in X and Y |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
Integer |
getDx()
Gets the Integer representing the change in the X direction of this vector |
Integer |
getDy()
Gets the Integer representing the change in the Y direction of this vector |
void |
setDx(Integer dx)
Sets the change in the X direction of this Vector |
void |
setDy(Integer dy)
Sets the change in the Y direction of this Vector |
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(Integer dx,
Integer dy)
dx - The difference in the X directiondy - The difference in the Y direction| Method Detail |
|---|
public Integer getDx()
public Integer getDy()
public void setDx(Integer dx)
dx - The new difference in the X directionpublic void setDy(Integer dy)
dy - The new difference in the Y directionpublic String toString()
toString in class ObjectObject.toString()public boolean equals(Object o)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||