package org.camsrobotics.lib;

import java.util.ArrayList;

/**
 * Loops a bunch of stuff
 * 
 * @author Wesley
 *
 */
public class MultiLooper implements Loopable {
	private Looper m_looper;
	private ArrayList<Loopable> m_loopables;
	
	public MultiLooper(String name, double period)	{
		m_looper = new Looper(name, this, period);
	}
	
	@Override
	public void update() {
		for(int i = 0; i < m_loopables.size(); i++)	{
			m_loopables.get(i).update();
		}
	}
	
	public void addLoopable(Loopable loopable)	{
		m_loopables.add(loopable);
	}
	
	public void start()	{
		m_looper.start();
	}
	
	public void stop()	{
		m_looper.stop();
	}

}

@@ -43,25 +43,22 @@
 va.util.
-ArrayList
+Vector
 ;%0D%0A%0D%0A/**
@@ -207,17 +207,14 @@
 ate 
-ArrayList
+Vector
 %3CLoo
@@ -231,16 +231,41 @@
 oopables
+ = new Vector%3CLoopable%3E()
 ;%0D%0A%09%0D%0A%09p

Fix the null pointer