

package com.aashreys.walls.domain.display.collections;

import com.aashreys.walls.domain.values.Id;
import com.aashreys.walls.domain.values.Name;

import javax.inject.Inject;

/**
 * Created by aashreys on 04/02/17.
 */

public class CollectionFactory {

    @Inject
    CollectionFactory() {}

    public Collection create(@Collection.Type String type, Id id, Name name) {
        switch (type) {
            case Collection.Type.UNSPLASH_COLLECTION:
                return new UnsplashCollection(id, name);

            case Collection.Type.DISCOVER:
                return new DiscoverCollection();

            case Collection.Type.FAVORITE:
                return new FavoriteCollection();
        }
        throw new IllegalArgumentException("Unexpected collection type");
    }

}
