namespace ZionSchematics.Models.SearchConstraintTypes
{
    public class SearchAreaConstraintFactory
    {
        private const string All = "ALL";
        private const string First = "FIRST";
        private const string Last = "LAST";
        private const string Even = "EVEN";
        private const string Odd = "ODD";
        private const string Range = "RANGE";

        public static ISearchAreaConstraints Construct(string type)
        {
            switch (type.ToUpper())
            {
                case All: return new All();
                case First: return new First();
                case Last: return new Last();
                case Even: return new Even();
                case Odd: return new Odd();
                case Range: return new Range();
                default: return null;
            }
        }
    }
}
