I
- symbol class.public interface Alphabet<I> extends ArrayWritable<I>, Collection<I>, Comparator<I>
Modifier and Type | Method and Description |
---|---|
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.
|
size, writeToArray
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
compare, comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
@Nullable I getSymbol(int index) throws IllegalArgumentException
index
- the index of the requested symbol.IllegalArgumentException
- if there is no symbol with this index.int getSymbolIndex(@Nullable I symbol) throws IllegalArgumentException
symbol
- IllegalArgumentException
- if the provided symbol does not belong to the alphabet.Copyright © 2015. All rights reserved.