jasi.sim.geo.util
Class Line

java.lang.Object
  extended by jasi.sim.geo.GeoObject
      extended by jasi.sim.geo.util.Line
All Implemented Interfaces:
SimValue, Geometric, java.io.Serializable

public final class Line
extends GeoObject

Immutable class to represent a line.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface jasi.sim.geo.Geometric
BEGIN, END, MIDLE
 
Constructor Summary
Line(SpaceVec p, Direction d, Space l)
          Constructor of a line.
Line(SpaceVec p, SpaceVec q)
          Constructor of a line.
Line(java.lang.String s)
          Constructor of a line.
 
Method Summary
 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.
 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

Line

public Line(SpaceVec p,
            Direction d,
            Space l)
Constructor of a line.

Parameters:
p - The start point.
d - The direction.
l - The length.

Line

public Line(SpaceVec p,
            SpaceVec q)
Constructor of a line.

Parameters:
p - The space vector of the base reference point.
q - The space vector of the direction reference point.

Line

public Line(java.lang.String s)
Constructor of a line.

Parameters:
s - The string representation of a line.
Method Detail

toString

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

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

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hash tablese.

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.