fhm.edu.fem.calc.objects
Class ElementList

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

public class ElementList
extends java.lang.Object

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

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

Field Summary
protected  java.util.ArrayList<Element> elements
           
protected static Logger localLogger
           
 
Constructor Summary
ElementList()
          Create a new element list
 
Method Summary
 void clear()
          Clear the list
 java.lang.Object clone()
          Clone Implementation
 Node doesNodeExistBetween(Node a, Node b)
          Checks if somewhere in this elementlist does a node already exist between the given nodes (in any element)
 Element getElement(int elementIndex)
          Retrieve a element with the given index from the list
 void setElement(Element element)
          Set a new element in the list.
 int size()
          Retrieve the number of elements in the list
 java.lang.Object[] toArray()
          Convert this list to an array of elements
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

elements

protected java.util.ArrayList<Element> elements

localLogger

protected static Logger localLogger
Constructor Detail

ElementList

public ElementList()
Create a new element list

Method Detail

clear

public void clear()
Clear the list


clone

public java.lang.Object clone()
Clone Implementation

Overrides:
clone in class java.lang.Object
Returns:
a clone of this list

doesNodeExistBetween

public Node doesNodeExistBetween(Node a,
                                 Node b)
Checks if somewhere in this elementlist does a node already exist between the given nodes (in any element)

Parameters:
a, - the first node
b, - the second node
Returns:
null if no node has been found, or the node itself

getElement

public Element getElement(int elementIndex)
Retrieve a element with the given index from the list

Parameters:
elementIndex -
Returns:
the found element

setElement

public void setElement(Element element)
Set a new element in the list. It will be set at the index specified in the element

Parameters:
element, - the element to set

size

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

Returns:
the number of elements

toArray

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

Returns:
the element array