Package org.jfree.data.xy
Class Vector
- java.lang.Object
-
- org.jfree.data.xy.Vector
-
- All Implemented Interfaces:
java.io.Serializable
public class Vector extends java.lang.Object implements java.io.SerializableA vector.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Vector(double x, double y)Creates a new instance ofVector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Tests this vector for equality with an arbitrary object.doublegetAngle()Returns the angle of the vector.doublegetLength()Returns the length of the vector.doublegetX()Returns the x-value.doublegetY()Returns the y-value.inthashCode()Returns a hash code for this instance.
-
-
-
Method Detail
-
getX
public double getX()
Returns the x-value.- Returns:
- The x-value.
-
getY
public double getY()
Returns the y-value.- Returns:
- The y-value.
-
getLength
public double getLength()
Returns the length of the vector.- Returns:
- The vector length.
-
getAngle
public double getAngle()
Returns the angle of the vector.- Returns:
- The angle of the vector.
-
equals
public boolean equals(java.lang.Object obj)
Tests this vector for equality with an arbitrary object.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the object (nullnot permitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code for this instance.- Overrides:
hashCodein classjava.lang.Object- Returns:
- A hash code.
-
-