org.jfree.data.xy

Class Vector

public class Vector extends Object implements Serializable

A vector.

Since: 1.0.6

Constructor Summary
Vector(double x, double y)
Creates a new instance of Vector.
Method Summary
booleanequals(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.

Constructor Detail

Vector

public Vector(double x, double y)
Creates a new instance of Vector.

Parameters: x the x-component. y the y-component.

Method Detail

equals

public boolean equals(Object obj)
Tests this vector for equality with an arbitrary object.

Parameters: obj the object (null not permitted).

Returns: A boolean.

getAngle

public double getAngle()
Returns the angle of the vector.

Returns: The angle of the vector.

getLength

public double getLength()
Returns the length of the vector.

Returns: The vector length.

getX

public double getX()
Returns the x-value.

Returns: The x-value.

getY

public double getY()
Returns the y-value.

Returns: The y-value.

hashCode

public int hashCode()
Returns a hash code for this instance.

Returns: A hash code.

Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.