// Path: FlyverTest/FlyverCore/src/main/java/co/flyver/flyvercore/microcontrollers/IOIOOutputs/exceptions/OutputsListException.java
// public class OutputsListException extends Exception {
//     public OutputsListException(String detailMessage) {
//         super(detailMessage);
//     }
// }


import java.util.LinkedList;
import co.flyver.flyvercore.microcontrollers.IOIOOutputs.exceptions.OutputsListException;
package co.flyver.flyvercore.microcontrollers.IOIOOutputs;




/**
 * Created by Tihomir Nedev on 15-2-17.
 */
public class OutputsList {

    static OutputsList instance;

    LinkedList<IOIOOutput> outputs = new LinkedList<>();

    public void addOutput(IOIOOutput ioioOutput) {
        outputs.add(ioioOutput);
    }

    public LinkedList<IOIOOutput> getOutputs() {
        return outputs;
    }

    public static OutputsList getInstance() throws OutputsListException {
        if(instance == null) {
// Path: FlyverTest/FlyverCore/src/main/java/co/flyver/flyvercore/microcontrollers/IOIOOutputs/exceptions/OutputsListException.java
// public class OutputsListException extends Exception {
//     public OutputsListException(String detailMessage) {
//         super(detailMessage);
//     }
// }


// Path: FlyverTest/FlyverCore/src/main/java/co/flyver/flyvercore/microcontrollers/IOIOOutputs/OutputsList.java
import java.util.LinkedList;
import co.flyver.flyvercore.microcontrollers.IOIOOutputs.exceptions.OutputsListException;

package co.flyver.flyvercore.microcontrollers.IOIOOutputs;




/**
 * Created by Tihomir Nedev on 15-2-17.
 */
public class OutputsList {

    static OutputsList instance;

    LinkedList<IOIOOutput> outputs = new LinkedList<>();

    public void addOutput(IOIOOutput ioioOutput) {
        outputs.add(ioioOutput);
    }

    public LinkedList<IOIOOutput> getOutputs() {
        return outputs;
    }

    public static OutputsList getInstance() throws OutputsListException {
        if(instance == null) {
            throw new OutputsListException("Outputs list not created. Call OutputsList.create() first");