package org.academiadecodigo.enuminatti.helloworld.services;

import org.academiadecodigo.enuminatti.helloworld.models.Bootcamp;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * MIT License
 * (c) 2017 Ricardo Constantino
 */

public class BootcampService {
    private Map<Integer, Bootcamp> bootcamps;

    public BootcampService() {
        bootcamps = new HashMap<>();
    }

    public void addBootcamp(Bootcamp bootcamp) {
        bootcamps.put(bootcamp.getId(), bootcamp);
    }

    public List<Bootcamp> getBootcampList() {
        return new ArrayList<>(bootcamps.values());
    }
}
