Package net.automatalib.alphabet
Interface GrowingAlphabet<I>
-
- Type Parameters:
I
- symbol class.
- All Superinterfaces:
Alphabet<I>
,ArrayWritable<I>
,Collection<I>
,Comparator<I>
,IntFunction<I>
,Iterable<I>
,ToIntFunction<I>
- All Known Implementing Classes:
FastAlphabet
,GrowingMapAlphabet
public interface GrowingAlphabet<I> extends Alphabet<I>
Alphabet
class that supports adding new symbols.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
addSymbol(I a)
Adds a new symbol to the alphabet.-
Methods inherited from interface net.automatalib.alphabet.Alphabet
apply, applyAsInt, compare, containsSymbol, getSymbol, getSymbolIndex, translateFrom, writeToArray
-
Methods inherited from interface net.automatalib.common.smartcollection.ArrayWritable
size
-
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
addSymbol
int addSymbol(I a)
Adds a new symbol to the alphabet. Some alphabets may prevent symbols from being added twice. In this case, the original alphabet remains unchanged, but this is not considered an error.- Returns:
- the index of the symbol in the alphabet, after adding it.
-
-