package com.sourcefellows.sideeffects;

import java.util.HashMap;
import java.util.Map;

public class Ships {

    private final Map<String, Ship> ships = new HashMap<>();

    public void addShip(Ship ship) {
        ships.put(ship.getName(), ship);
    }

    public Ship getShip(String name) {
        return ships.get(name);
    }

}
