- java.lang.Object
-
- net.automatalib.alphabet.impl.Alphabets
-
public final class Alphabets extends Object
Utility methods concerning alphabets.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Alphabet<Character>
characters(char startInclusive, char endInclusive)
static Alphabet<String>
closedCharStringRange(char startInclusive, char endInclusive)
static <I> Collector<I,?,GrowingAlphabet<I>>
collector()
Returns aCollector
that collects individual symbols (in order and without duplicates) and aggregates them in aGrowingAlphabet
.static <T> Alphabet<T>
fromArray(T... symbols)
static <I> Alphabet<I>
fromCollection(Collection<? extends I> coll)
static <I> Alphabet<I>
fromCollections(Collection<? extends I>... colls)
static <E extends Enum<E>>
Alphabet<E>fromEnum(Class<E> enumClazz)
static <E extends Enum<E>>
Alphabet<E>fromEnum(Class<E> enumClazz, boolean withNull)
static <T> Alphabet<T>
fromList(List<? extends T> list)
static Alphabet<Integer>
integers(int startInclusive, int endInclusive)
static <T> Alphabet<T>
singleton(T symbol)
-
-
-
Method Detail
-
fromArray
@SafeVarargs public static <T> Alphabet<T> fromArray(T... symbols)
-
fromEnum
public static <E extends Enum<E>> Alphabet<E> fromEnum(Class<E> enumClazz, boolean withNull)
-
closedCharStringRange
public static Alphabet<String> closedCharStringRange(char startInclusive, char endInclusive)
-
singleton
public static <T> Alphabet<T> singleton(T symbol)
-
fromCollection
public static <I> Alphabet<I> fromCollection(Collection<? extends I> coll)
-
fromCollections
@SafeVarargs public static <I> Alphabet<I> fromCollections(Collection<? extends I>... colls)
-
collector
public static <I> Collector<I,?,GrowingAlphabet<I>> collector()
Returns aCollector
that collects individual symbols (in order and without duplicates) and aggregates them in aGrowingAlphabet
.- Type Parameters:
I
- input symbol type- Returns:
- a
Collector
that collects individual symbols (in order and without duplicates) and aggregates them in aGrowingAlphabet
-
-