fhm.edu.fem.calc.objects
Class Force

java.lang.Object
  extended by fhm.edu.fem.calc.objects.Force

public class Force
extends java.lang.Object

Class Description: This class acts as "force"

Author:
Thomas Woellert (thomas@woellert.net), Stefan Weissbach (weissbst@gmx.de)

Field Summary
protected  int id
           
protected  Node node
           
protected  double x
           
protected  double y
           
 
Constructor Summary
Force(int id, double x, double y, Node node)
          Construct a new force with the given ID
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compare this force with another given force
 int getId()
           
 Node getNode()
           
 double getX()
           
 double getY()
           
 void setX(double x)
           
 void setY(double y)
           
 java.lang.String toString()
          Implementation of the toString() method
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected int id

node

protected Node node

x

protected double x

y

protected double y
Constructor Detail

Force

public Force(int id,
             double x,
             double y,
             Node node)
Construct a new force with the given ID

Parameters:
id, - the ID for this force
x, - the x coordinate for this force
y, - the y coordinate for this force
node, - the node this force is related to
Method Detail

equals

public boolean equals(java.lang.Object obj)
Compare this force with another given force

Overrides:
equals in class java.lang.Object
Parameters:
obj, - the other force

getId

public int getId()
Returns:
Returns the id.

getNode

public Node getNode()
Returns:
Returns the node.

getX

public double getX()
Returns:
Returns the x.

getY

public double getY()
Returns:
Returns the y.

setX

public void setX(double x)
Parameters:
x - The x to set.

setY

public void setY(double y)
Parameters:
y - The y to set.

toString

public java.lang.String toString()
Implementation of the toString() method

Overrides:
toString in class java.lang.Object
Returns:
a string visualization of the node