jasi.sim.geo.cartesian
Class LinearMove

java.lang.Object
  extended by jasi.sim.geo.GeoObject
      extended by jasi.sim.geo.cartesian.LinearMove
All Implemented Interfaces:
SimValue, Move, Geometric, java.io.Serializable

public final class LinearMove
extends GeoObject
implements Move

This class provides algorithms for linear movements with constant speed.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface jasi.sim.geo.Geometric
BEGIN, END, MIDLE
 
Constructor Summary
LinearMove(LinearMove position)
          Constructor of a position.
LinearMove(SpaceVec a)
          Constructor of a "non-moving" linear movement.
LinearMove(SpaceVec a, Time start, SpaceVec b, Speed v)
          Constructor of a linear movement between to positions.
LinearMove(SpaceVec a, Time start, SpaceVec b, Time end)
          Constructor of a linear movement between to positions.
LinearMove(SpaceVec a, Time start, SpeedVec v, Time end)
          Constructor of a linear movement between to positions.
LinearMove(java.lang.String position)
          Constructor of a position.
 
Method Summary
 Space distance(Move p, Time t)
          Retrieve the distance at a given time of this movement from that movement.
 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.
 Move moveAt(Time t)
          Get the movement at a given time.
 Direction readDirection()
          Get the direction vector for a given time.
 Space readMinimumDistance(SpaceVec r)
          Get the minimum distance from a given vector of a location in space.
 Time readMinimumTime(SpaceVec r)
          Get the time of minimum distance from a given space vector.
 SpaceVec readSpaceVec(Time t)
          Get the space vector of this location for a given time.
 Speed readSpeed()
          Get the speed for a given time.
 SpeedVec readSpeedVec()
          Get the speed vector for a given time.
 SpaceVec readStart()
          Get the start position.
 Time readStartTime()
          Get the start time.
 SpaceVec readTarget()
          Get the end position.
 Time readTargetTime()
          Get the end 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
 

Constructor Detail

LinearMove

public LinearMove(SpaceVec a,
                  Time start,
                  SpaceVec b,
                  Time end)
Constructor of a linear movement between to positions.

Parameters:
a - The start position.
start - The start time.
b - The end position.
end - The end time.

LinearMove

public LinearMove(SpaceVec a,
                  Time start,
                  SpaceVec b,
                  Speed v)
Constructor of a linear movement between to positions.

Parameters:
a - The start position.
start - The start time.
b - The end position.
v - The speed.

LinearMove

public LinearMove(SpaceVec a,
                  Time start,
                  SpeedVec v,
                  Time end)
Constructor of a linear movement between to positions.

Parameters:
a - The start position.
start - The start time.
v - The speed vector.
end - The end time.

LinearMove

public LinearMove(SpaceVec a)
Constructor of a "non-moving" linear movement.

Parameters:
a - The position.

LinearMove

public LinearMove(LinearMove position)
Constructor of a position.

Parameters:
position - A position.

LinearMove

public LinearMove(java.lang.String position)
Constructor of a position.

Parameters:
position - The string representation of a position.
Method Detail

readSpaceVec

public SpaceVec readSpaceVec(Time t)
Get the space vector of this location for a given time.

Parameters:
t - That time.
Returns:
The space vector at that time.

readSpeedVec

public SpeedVec readSpeedVec()
Get the speed vector for a given time.

Returns:
The speed vector.

readDirection

public Direction readDirection()
Get the direction vector for a given time.

Returns:
The direction vector.

readSpeed

public Speed readSpeed()
Get the speed for a given time.

Returns:
The speed.

readStart

public SpaceVec readStart()
Get the start position.

Returns:
The start position.

readStartTime

public Time readStartTime()
Get the start time.

Returns:
The start time.

readTarget

public SpaceVec readTarget()
Get the end position.

Returns:
The start position.

readTargetTime

public Time readTargetTime()
Get the end time.

Returns:
The start time.

readMinimumDistance

public Space readMinimumDistance(SpaceVec r)
Get the minimum distance from a given vector of a location in space.

Parameters:
r - That space vector.
Returns:
The minimum distance.

readMinimumTime

public Time readMinimumTime(SpaceVec r)
Get the time of minimum distance from a given space vector.

Parameters:
r - That space vector.
Returns:
The time of the minimum distance.

moveAt

public Move moveAt(Time t)
Get the movement at a given time.

Specified by:
moveAt in interface Move
Parameters:
t - That time.
Returns:
The movement at that given time.

distance

public Space distance(Move p,
                      Time t)
Retrieve the distance at a given time of this movement from that movement.

Specified by:
distance in interface Move
Parameters:
p - That location.
t - The another time.
Returns:
Its distance.

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

Overrides:
hashCode in class java.lang.Object
Returns:
A hash code value for this object.

equals

public boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object
Parameters:
o - That object which is compared with this object.
Returns:
True, if this object is the same as that object.

toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
The string.