bass.visualisation.graph
Class BassEdgeList

java.lang.Object
  extended by bass.visualisation.graph.BassList<BassEdge>
      extended by bass.visualisation.graph.BassEdgeList
All Implemented Interfaces:
java.lang.Iterable<BassEdge>

public class BassEdgeList
extends BassList<BassEdge>

BassEdgeList contains as much BassEdges as desired. It is the general object-type for bassedges (connection between two bands) BassEdge

Version:
0.1
Author:
Patrick Mai

Field Summary
 
Fields inherited from class bass.visualisation.graph.BassList
amount, elements
 
Constructor Summary
BassEdgeList()
           
 
Method Summary
 void add(BassEdge e)
          Adds the param to the existing BassEdgeList.
 boolean contains(BassEdge e)
           
 BassEdge get(int index)
           
 int getAmountOfEdges()
           
 void increaseAmount()
          Everytime an edge is added to the list this method can be called.
 void remove(BassEdge e)
          Removes the param edge from the list
 
Methods inherited from class bass.visualisation.graph.BassList
iterator, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BassEdgeList

public BassEdgeList()
Method Detail

add

public void add(BassEdge e)
Adds the param to the existing BassEdgeList. This is done only if the param doesn't exist already.

Parameters:
e - The BassEdge to add to the BassEdgeList

remove

public void remove(BassEdge e)
Removes the param edge from the list

Parameters:
e - the edge to remove

contains

public boolean contains(BassEdge e)
Parameters:
e - The bassedge to check
Returns:
true if the bassedge exists in the list, false if not

getAmountOfEdges

public int getAmountOfEdges()
Returns:
The amount of edges this list inherits

increaseAmount

public void increaseAmount()
Everytime an edge is added to the list this method can be called. It prevents from iterating through the list all the time you need to know how many edges are in.


get

public BassEdge get(int index)
Parameters:
index - The position of the edge you want to get
Returns:
The BassEdge on the specific position in the Vector