I - input symbol class.public class FastAlphabet<I extends MutableNumericID> extends DynamicList<I> implements GrowingAlphabet<I>
modCount| Constructor and Description |
|---|
FastAlphabet() |
FastAlphabet(I... symbols) |
FastAlphabet(List<? extends I> symbols) |
| Modifier and Type | Method and Description |
|---|---|
int |
addSymbol(I a)
Adds a new symbol to the alphabet.
|
int |
compare(I o1,
I o2) |
boolean |
containsSymbol(I symbol)
Checks whether the given symbol is part of the alphabet.
|
I |
getSymbol(int index)
Returns the symbol with the given index in this alphabet.
|
int |
getSymbolIndex(I symbol)
Returns the index of the given symbol in the alphabet.
|
add, clear, get, isEmpty, iterator, remove, remove, remove, safeGet, size, swap, writeToArrayadd, addAll, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitapply, applyAsInt, translateFrom, writeToArraysizeadd, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArraycomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongaddAll, contains, containsAll, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArraypublic FastAlphabet()
@SafeVarargs public FastAlphabet(I... symbols)
public int addSymbol(@Nonnull I a)
GrowingAlphabetaddSymbol in interface GrowingAlphabet<I extends MutableNumericID>@Nonnull public I getSymbol(int index)
AlphabetgetSymbol in interface Alphabet<I extends MutableNumericID>index - the index of the requested symbol.public int getSymbolIndex(@Nonnull I symbol)
AlphabetgetSymbolIndex in interface Alphabet<I extends MutableNumericID>public int compare(@Nonnull I o1, @Nonnull I o2)
compare in interface Comparator<I extends MutableNumericID>compare in interface Alphabet<I extends MutableNumericID>public boolean containsSymbol(I symbol)
AlphabetCaution: the default implementation is rather inefficient and should be overridden, if possible.
containsSymbol in interface Alphabet<I extends MutableNumericID>symbol - the symbol to checktrue iff the symbol is part of the alphabetCopyright © 2018. All rights reserved.