001package net.automatalib.words.impl;
002
003import java.util.List;
004
005import net.automatalib.commons.util.collections.CollectionsUtil;
006import net.automatalib.words.Alphabet;
007
008public abstract class Alphabets {
009
010        public static <T> Alphabet<T> fromList(List<? extends T> list) {
011                return new ListAlphabet<>(list);
012        }
013        
014        public static Alphabet<Integer> integers(int startInclusive, int endInclusive) {
015                List<Integer> lst = CollectionsUtil.intRange(startInclusive, endInclusive + 1);
016                return fromList(lst);
017        }
018        
019        public static Alphabet<Character> characters(char startInclusive, char endInclusive) {
020                List<Character> lst = CollectionsUtil.charRange(startInclusive, (char)(endInclusive + 1));
021                return fromList(lst);
022        }
023        
024        
025        
026        private Alphabets() {
027                // prevent inheritance
028        }
029
030}