|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jasi.sim.geo.GeoObject jasi.sim.geo.cartesian.SpeedVec
public final class SpeedVec
Immutable class to represent a speed vector.
Field Summary | |
---|---|
static java.util.Comparator<SpeedVec> |
COMPARATOR
The value comparator of speed vectors. |
static SpeedVec |
FIXED
Non-moving speed vector, fixed. |
Fields inherited from interface jasi.sim.geo.Geometric |
---|
BEGIN, END, MIDLE |
Constructor Summary | |
---|---|
SpeedVec(Speed x,
Speed y)
Constructor of a speed vector, with vanishing third component. |
|
SpeedVec(Speed x,
Speed y,
Speed z)
Constructor of a speed vector. |
|
SpeedVec(SpeedVec s)
Constructor of a speed vector. |
|
SpeedVec(java.lang.String s)
Constructor of a speed vector. |
Method Summary | |
---|---|
Speed |
abs()
Retrieve the absolut speed value of this speed vector. |
SpeedVec |
add(SpeedVec p)
Add that speed vector to this speed vector. |
Speed[] |
components()
Get the components of this space vector. |
Direction |
direction()
Retrieve unit direction of this speed vector. |
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one. |
int |
hashCode()
Returns a hash code value for the object. |
SpeedVec |
minus(SpeedVec p)
Substract that speed vector from this speed vector. |
SpeedVec |
times(double f)
Multiply this speed vector by a factor. |
SpaceVec |
times(Time time)
Calculate the space vector distance which is achieved by this speed vector in a given time. |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class jasi.sim.geo.GeoObject |
---|
getContent |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.Comparator<SpeedVec> COMPARATOR
public static final SpeedVec FIXED
Constructor Detail |
---|
public SpeedVec(Speed x, Speed y, Speed z)
x
- First component.y
- Second component.z
- Third component.public SpeedVec(SpeedVec s)
s
- A speed vector.public SpeedVec(Speed x, Speed y)
x
- First component.y
- Second component.public SpeedVec(java.lang.String s)
s
- The string representation of a speed vector object.Method Detail |
---|
public SpaceVec times(Time time)
time
- The time.
public Speed abs()
public Direction direction()
public Speed[] components()
public SpeedVec add(SpeedVec p)
p
- That speed vector.
public SpeedVec minus(SpeedVec p)
p
- That speed vector.
public SpeedVec times(double f)
f
- The multiplication factor.
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- That object which is compared with this object.
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |