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) |
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, writeToArray
add, addAll, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, removeAll, retainAll, toArray, toArray, toString
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
writeToArray
size
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
addAll, contains, containsAll, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
public FastAlphabet()
@SafeVarargs public FastAlphabet(I... symbols)
@Nonnull public I getSymbol(int index)
Alphabet
getSymbol
in interface Alphabet<I extends MutableNumericID>
index
- the index of the requested symbol.public int getSymbolIndex(@Nonnull I symbol)
Alphabet
getSymbolIndex
in interface Alphabet<I extends MutableNumericID>
public int addSymbol(@Nonnull I a)
GrowingAlphabet
addSymbol
in interface GrowingAlphabet<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>
Copyright © 2015. All rights reserved.