fhm.edu.fem.calc.objects
Class Force
java.lang.Object
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 |
id
protected int id
node
protected Node node
x
protected double x
y
protected double y
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 forcex,
- the x coordinate for this forcey,
- the y coordinate for this forcenode,
- the node this force is related to
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