bass.visualisation.graph
Class BassNodeList

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

public class BassNodeList
extends BassList<BassNode>

BassNodeList contains as much BassNodes as desired. It is the general object-type for BassNode's (A band)

Version:
0.1
Author:
Patrick Mai

Field Summary
private  BassClusterList clusters
           
 
Fields inherited from class bass.visualisation.graph.BassList
amount, elements
 
Constructor Summary
BassNodeList()
          empty constructor
 
Method Summary
 void add(BassNode n)
          Adds a BassNode to this list.
 boolean contains(BassNode n)
          Checks this list for the element
 int getAmountOfNodes()
           
 BassClusterList getClusters()
           
 int getIndexByName(java.lang.String id)
           
 BassNode getNode(int index)
           
 void increaseAmount()
          Each time the add method is called this should be called as well.
 boolean isInList(BassNode n)
          Checks if this list contains the param element.
 void remove(BassNode n)
           
 
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
 

Field Detail

clusters

private BassClusterList clusters
Constructor Detail

BassNodeList

public BassNodeList()
empty constructor

Method Detail

add

public void add(BassNode n)
Adds a BassNode to this list.

Parameters:
n - The BassNode to be added to the list

getNode

public BassNode getNode(int index)
Parameters:
index - The index where the desired BassNode is stored in this list.
Returns:
The desired BassNode

getIndexByName

public int getIndexByName(java.lang.String id)
Parameters:
id - The ID (Unique band id from mySpace.com) of the Band you want to get
Returns:
the index of the list (vector) where the BassNode (band) is stored

remove

public void remove(BassNode n)
Parameters:
n - The BassNode to remove from the list

contains

public boolean contains(BassNode n)
Checks this list for the element

Parameters:
n - The BassNode to be checked
Returns:
true if it's in the list, false if not

isInList

public boolean isInList(BassNode n)
Checks if this list contains the param element. This is based on each elements id. Thus an equals relation.

Parameters:
n - The BassNode to be checked
Returns:
true if the BassNode is in this list, false if not.

getAmountOfNodes

public int getAmountOfNodes()
Returns:
the amount of BassNodes in this list.

increaseAmount

public void increaseAmount()
Each time the add method is called this should be called as well.


getClusters

public BassClusterList getClusters()
Returns:
The clusters in this list