// Path: src/main/java/au/edu/jcu/v4l4j/exceptions/StateException.java
// public class StateException extends RuntimeException {
// 
// 	private static final long serialVersionUID = 1351714754008657462L;
// 
// 	public StateException(String message) {
// 		super(message);
// 	}
// 
// 	public StateException(String message, Throwable throwable) {
// 		super(message, throwable);
// 	}
// 
// 	public StateException(Throwable throwable) {
// 		super(throwable);
// 	}
// }


import java.util.Hashtable;
import java.util.List;
import java.util.Vector;
import au.edu.jcu.v4l4j.exceptions.StateException;
	 * This method returns a list of {@link Control}s
	 * @return a list of {@link Control}s
	 * @throws StateException if this control list has been released and must not be used anymore
	 */
	public synchronized List<Control> getList(){
		checkReleased();
		return new Vector<Control>(controls.values());
	}
	
	/**
	 * This method returns a control given its name.
	 * @return the control matching the given name, null otherwise
	 * @throws StateException if this control list has been released and must not be used anymore
	 */
	public synchronized Control getControl(String n){
		checkReleased();
		return controls.get(n);
	}
	
	/**
	 * This method released the control list, and all controls in it.
	 */
	synchronized void release(){
		released = true;
		for(Control c: controls.values())
			c.release();
	}

	private void checkReleased(){
		if(released)
// Path: src/main/java/au/edu/jcu/v4l4j/exceptions/StateException.java
// public class StateException extends RuntimeException {
// 
// 	private static final long serialVersionUID = 1351714754008657462L;
// 
// 	public StateException(String message) {
// 		super(message);
// 	}
// 
// 	public StateException(String message, Throwable throwable) {
// 		super(message, throwable);
// 	}
// 
// 	public StateException(Throwable throwable) {
// 		super(throwable);
// 	}
// }


// Path: src/main/java/au/edu/jcu/v4l4j/ControlList.java
import java.util.Hashtable;
import java.util.List;
import java.util.Vector;
import au.edu.jcu.v4l4j.exceptions.StateException;

	 * This method returns a list of {@link Control}s
	 * @return a list of {@link Control}s
	 * @throws StateException if this control list has been released and must not be used anymore
	 */
	public synchronized List<Control> getList(){
		checkReleased();
		return new Vector<Control>(controls.values());
	}
	
	/**
	 * This method returns a control given its name.
	 * @return the control matching the given name, null otherwise
	 * @throws StateException if this control list has been released and must not be used anymore
	 */
	public synchronized Control getControl(String n){
		checkReleased();
		return controls.get(n);
	}
	
	/**
	 * This method released the control list, and all controls in it.
	 */
	synchronized void release(){
		released = true;
		for(Control c: controls.values())
			c.release();
	}

	private void checkReleased(){
		if(released)
			throw new StateException("The control list has been released and must not be used");