fhm.edu.fem.calc.objects
Class ForceList

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

public class ForceList
extends java.lang.Object

Class Description: This class acts as force list. It takes the node index from the node itself

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

Field Summary
protected  java.util.ArrayList<Force> forces
           
 
Constructor Summary
ForceList()
          Create a new force list
 
Method Summary
 void clear()
          Clear the list
 boolean contains(Force force)
          Search for a specific force
 Force getForce(int forceIndex)
          Retrieve a force with the given index from the list
 java.util.ArrayList<Force> getList()
           
 void setForce(Force force)
          Set a new force in the list.
 int size()
          Retrieve the number of forces in the list
 java.lang.Object[] toArray()
          Convert this list to an array of forces
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

forces

protected java.util.ArrayList<Force> forces
Constructor Detail

ForceList

public ForceList()
Create a new force list

Method Detail

clear

public void clear()
Clear the list


contains

public boolean contains(Force force)
Search for a specific force

Parameters:
force, - the force to search
Returns:
boolean, true if it contains the list, false otherwise

getForce

public Force getForce(int forceIndex)
Retrieve a force with the given index from the list

Parameters:
forceIndex -
Returns:
the found force or 'null' if no force has been found

getList

public java.util.ArrayList<Force> getList()
Returns:
Get the ArrayList

setForce

public void setForce(Force force)
Set a new force in the list. It will be set at the index specified in the force

Parameters:
force, - the force to set

size

public int size()
Retrieve the number of forces in the list

Returns:
the number of forces

toArray

public java.lang.Object[] toArray()
Convert this list to an array of forces

Returns:
the node array