package lc.ris.client;

import java.util.Objects;

/**
 * This class implements a Java client for the Rapid Inventory System (RIS).
 * <p>
 * The RIS universe for the client must be configured. All interactions with the client and all associated objects will
 * be for that specific universe.
 *
 * @author Alex Leigh
 * @since mk1
 */
public class RapidInventoryClient {
    private final String universe;
    private final InventoryStore inventoryStore;

    public RapidInventoryClient(String universe) {
        this.universe = universe;
        this.inventoryStore = new MockInventoryStore();
    }

    @Override
    public String toString() {
        return "RapidInventoryClient{" +
                "universe='" + universe + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RapidInventoryClient that = (RapidInventoryClient) o;
        return Objects.equals(universe, that.universe);
    }

    @Override
    public int hashCode() {
        return Objects.hash(universe);
    }

    public InventoryStore getInventoryStore() {
        return inventoryStore;
    }
}
