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, finalize, getClass, notify, notifyAll, wait, wait, wait
size, writeToArray
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()
public FastAlphabet(List<? extends I> symbols)
@SafeVarargs public FastAlphabet(I... symbols)
public I getSymbol(int index)
Alphabet
getSymbol
in interface Alphabet<I extends MutableNumericID>
index
- the index of the requested symbol.public int getSymbolIndex(I symbol)
Alphabet
getSymbolIndex
in interface Alphabet<I extends MutableNumericID>
public int addSymbol(I a)
GrowingAlphabet
addSymbol
in interface GrowingAlphabet<I extends MutableNumericID>
public int compare(I o1, I o2)
compare
in interface Comparator<I extends MutableNumericID>
Copyright © 2015. All Rights Reserved.